Package org.apache.avro.protobuf
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
ConstructorsModifierConstructorDescriptionprotected
ProtobufDatumWriter
(ProtobufData protobufData) ProtobufDatumWriter
(org.apache.avro.Schema schema) protected
ProtobufDatumWriter
(org.apache.avro.Schema root, ProtobufData protobufData) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
writeBytes
(Object datum, org.apache.avro.io.Encoder out) protected void
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
-
Constructor Details
-
ProtobufDatumWriter
public ProtobufDatumWriter() -
ProtobufDatumWriter
-
ProtobufDatumWriter
public ProtobufDatumWriter(org.apache.avro.Schema schema) -
ProtobufDatumWriter
-
ProtobufDatumWriter
-
-
Method Details
-
writeEnum
protected void writeEnum(org.apache.avro.Schema schema, Object datum, org.apache.avro.io.Encoder out) throws IOException - Overrides:
writeEnum
in classorg.apache.avro.generic.GenericDatumWriter<T>
- Throws:
IOException
-
writeBytes
- Overrides:
writeBytes
in classorg.apache.avro.generic.GenericDatumWriter<T>
- Throws:
IOException
-