|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avro.generic.GenericDatumReader<T> org.apache.avro.specific.SpecificDatumReader<T>
public class SpecificDatumReader<T>
DatumReader
for generated Java classes.
Nested Class Summary | |
---|---|
static interface |
SpecificDatumReader.SchemaConstructable
Tag interface that indicates that a class has a one-argument constructor that accepts a Schema. |
Constructor Summary | |
---|---|
|
SpecificDatumReader()
|
|
SpecificDatumReader(Class<T> c)
|
|
SpecificDatumReader(Schema schema)
Construct where the writer's and reader's schemas are the same. |
|
SpecificDatumReader(Schema writer,
Schema reader)
Construct given writer's and reader's schema. |
protected |
SpecificDatumReader(Schema writer,
Schema reader,
SpecificData data)
|
Method Summary | |
---|---|
protected Object |
createEnum(String symbol,
Schema schema)
Called to create an enum value. |
protected Object |
createFixed(Object old,
Schema schema)
Called to create an fixed value. |
protected static Object |
newInstance(Class c,
Schema s)
Create an instance of a class. |
protected Object |
newRecord(Object old,
Schema schema)
Called to create new record instances. |
Methods inherited from class org.apache.avro.generic.GenericDatumReader |
---|
addToArray, addToMap, createBytes, createFixed, createString, getData, getResolver, newArray, newMap, peekArray, read, read, readArray, readBytes, readEnum, readFixed, readInt, readMap, readRecord, readString, readString, setExpected, setSchema, skip |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SpecificDatumReader()
public SpecificDatumReader(Class<T> c)
public SpecificDatumReader(Schema schema)
public SpecificDatumReader(Schema writer, Schema reader)
protected SpecificDatumReader(Schema writer, Schema reader, SpecificData data)
Method Detail |
---|
protected Object newRecord(Object old, Schema schema)
GenericDatumReader
GenericData.Record
.
newRecord
in class GenericDatumReader<T>
protected Object createEnum(String symbol, Schema schema)
GenericDatumReader
createEnum
in class GenericDatumReader<T>
protected Object createFixed(Object old, Schema schema)
GenericDatumReader
GenericFixed
.
createFixed
in class GenericDatumReader<T>
protected static Object newInstance(Class c, Schema s)
SpecificDatumReader.SchemaConstructable
, call a constructor with a Schema
parameter, otherwise use a no-arg constructor.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |