Class ProtobufDatumWriter<T>

java.lang.Object
org.apache.avro.generic.GenericDatumWriter<T>
org.apache.avro.protobuf.ProtobufDatumWriter<T>
All Implemented Interfaces:
org.apache.avro.io.DatumWriter<T>

public class ProtobufDatumWriter<T> extends org.apache.avro.generic.GenericDatumWriter<T>
DatumWriter for generated protobuf classes.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
     
     
     
    protected
     
     
    ProtobufDatumWriter(org.apache.avro.Schema schema)
     
    protected
    ProtobufDatumWriter(org.apache.avro.Schema root, ProtobufData protobufData)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    writeBytes(Object datum, org.apache.avro.io.Encoder out)
     
    protected void
    writeEnum(org.apache.avro.Schema schema, Object datum, org.apache.avro.io.Encoder out)
     

    Methods inherited from class org.apache.avro.generic.GenericDatumWriter

    addAvroTypeMsg, addClassCastMsg, convert, getArrayElements, getArraySize, getData, getMapEntries, getMapSize, npe, resolveUnion, setSchema, write, write, writeArray, writeField, writeFixed, writeMap, writeRecord, writeString, writeString, writeWithoutConversion

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.avro.io.DatumWriter

    toByteArray
  • Constructor Details

    • ProtobufDatumWriter

      public ProtobufDatumWriter()
    • ProtobufDatumWriter

      public ProtobufDatumWriter(Class<T> c)
    • ProtobufDatumWriter

      public ProtobufDatumWriter(org.apache.avro.Schema schema)
    • ProtobufDatumWriter

      protected ProtobufDatumWriter(org.apache.avro.Schema root, ProtobufData protobufData)
    • ProtobufDatumWriter

      protected ProtobufDatumWriter(ProtobufData protobufData)
  • Method Details

    • writeEnum

      protected void writeEnum(org.apache.avro.Schema schema, Object datum, org.apache.avro.io.Encoder out) throws IOException
      Overrides:
      writeEnum in class org.apache.avro.generic.GenericDatumWriter<T>
      Throws:
      IOException
    • writeBytes

      protected void writeBytes(Object datum, org.apache.avro.io.Encoder out) throws IOException
      Overrides:
      writeBytes in class org.apache.avro.generic.GenericDatumWriter<T>
      Throws:
      IOException