commonlib/src/main/java/com/streamsets/pipeline/lib/util/AvroSchemaHelper.java
public int writeSchemaId(OutputStream os, int schemaId) throws IOException {
    if (schemaId > 0) {
      os.write(MAGIC_BYTE);
      os.write(ByteBuffer.allocate(ID_SIZE).putInt(schemaId).array());
    }
    return schemaId;
  }
public int writeSchemaId(OutputStream os, int schemaId) throws IOException {
    if (schemaId > 0) {
      os.write(MAGIC_BYTE);
      os.write(ByteBuffer.allocate(ID_SIZE).putInt(schemaId).array());
    }
    return schemaId;
  }
public int writeSchemaId ( OutputStream os , int schemaId ) throws IOException { if ( schemaId > 0 ) { os . write ( MAGIC_BYTE ) ; os . write ( ByteBuffer . allocate ( ID_SIZE ) . putInt ( schemaId ) . array ( ) ) ; } return schemaId ; }
Writes the magic byte and schema ID to an output stream, replicating the functionality
of the Confluent Kafka Avro Serializer
@param os OutputStream to write to
@return schema ID that was written
@throws IOException if there is an error
Writes the magic byte and schema ID to an output stream replicating the functionality of the Confluent Kafka Avro Serializer