public class ProtobufDatumReader<T> extends GenericDatumReader<T>
DatumReader
for generated Protobuf
classes.Modifier | Constructor and Description |
---|---|
|
ProtobufDatumReader() |
|
ProtobufDatumReader(Class<T> c) |
|
ProtobufDatumReader(Schema schema)
Construct where the writer's and reader's schemas are the same.
|
|
ProtobufDatumReader(Schema writer,
Schema reader)
Construct given writer's and reader's schema.
|
protected |
ProtobufDatumReader(Schema writer,
Schema reader,
ProtobufData data) |
Modifier and Type | Method and Description |
---|---|
protected Object |
createEnum(String symbol,
Schema schema)
Called to create an enum value.
|
protected Object |
readBytes(Object old,
Decoder in)
Called to read byte arrays.
|
protected Object |
readRecord(Object old,
Schema expected,
ResolvingDecoder in)
Called to read a record instance.
|
addToArray, addToMap, convert, createBytes, createFixed, createFixed, createString, findStringClass, getData, getExpected, getResolver, getSchema, newArray, newInstanceFromString, newMap, newRecord, peekArray, read, read, readArray, readBytes, readEnum, readField, readFixed, readInt, readMap, readMapKey, readString, readString, readWithConversion, readWithoutConversion, setExpected, setSchema, skip
public ProtobufDatumReader()
public ProtobufDatumReader(Schema schema)
public ProtobufDatumReader(Schema writer, Schema reader)
protected ProtobufDatumReader(Schema writer, Schema reader, ProtobufData data)
protected Object readRecord(Object old, Schema expected, ResolvingDecoder in) throws IOException
GenericDatumReader
readRecord
in class GenericDatumReader<T>
IOException
protected Object createEnum(String symbol, Schema schema)
GenericDatumReader
createEnum
in class GenericDatumReader<T>
protected Object readBytes(Object old, Decoder in) throws IOException
GenericDatumReader
Decoder.readBytes(ByteBuffer)
.readBytes
in class GenericDatumReader<T>
IOException
Copyright © 2009–2020 The Apache Software Foundation. All rights reserved.