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
ConstructorsModifierConstructorDescriptionprotectedProtobufDatumWriter(ProtobufData protobufData) ProtobufDatumWriter(org.apache.avro.Schema schema) protectedProtobufDatumWriter(org.apache.avro.Schema root, ProtobufData protobufData) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidwriteBytes(Object datum, org.apache.avro.io.Encoder out) protected voidMethods 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:
writeEnumin classorg.apache.avro.generic.GenericDatumWriter<T>- Throws:
IOException
-
writeBytes
- Overrides:
writeBytesin classorg.apache.avro.generic.GenericDatumWriter<T>- Throws:
IOException
-