org.apache.avro.specific
Class SpecificDatumReader
java.lang.Object
org.apache.avro.generic.GenericDatumReader<Object>
org.apache.avro.reflect.ReflectDatumReader
org.apache.avro.specific.SpecificDatumReader
- All Implemented Interfaces:
- DatumReader<Object>
public class SpecificDatumReader
- extends ReflectDatumReader
DatumReader
for generated Java classes.
Method Summary |
protected void |
addField(Object record,
String name,
int position,
Object o)
Called by the default implementation of GenericDatumReader.readRecord(java.lang.Object, org.apache.avro.Schema, org.apache.avro.Schema, org.apache.avro.io.Decoder) to add a
record fields value to a record instance. |
protected Object |
getField(Object record,
String name,
int position)
Called by the default implementation of GenericDatumReader.readRecord(java.lang.Object, org.apache.avro.Schema, org.apache.avro.Schema, org.apache.avro.io.Decoder) to retrieve a
record field value from a reused instance. |
protected void |
removeField(Object record,
String field,
int position)
Called by the default implementation of GenericDatumReader.readRecord(java.lang.Object, org.apache.avro.Schema, org.apache.avro.Schema, org.apache.avro.io.Decoder) to remove a
record field value from a reused instance. |
Methods inherited from class org.apache.avro.generic.GenericDatumReader |
addToArray, addToMap, createBytes, createFixed, createString, defaultFieldValue, newArray, newMap, peekArray, read, read, readArray, readBytes, readEnum, readFixed, readMap, readRecord, readString, setSchema, skip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SpecificDatumReader
public SpecificDatumReader(String packageName)
SpecificDatumReader
public SpecificDatumReader(Schema root,
String packageName)
SpecificDatumReader
public SpecificDatumReader(Schema root)
addField
protected void addField(Object record,
String name,
int position,
Object o)
- Description copied from class:
GenericDatumReader
- Called by the default implementation of
GenericDatumReader.readRecord(java.lang.Object, org.apache.avro.Schema, org.apache.avro.Schema, org.apache.avro.io.Decoder)
to add a
record fields value to a record instance. The default implementation is
for GenericRecord
.
- Overrides:
addField
in class ReflectDatumReader
getField
protected Object getField(Object record,
String name,
int position)
- Description copied from class:
GenericDatumReader
- Called by the default implementation of
GenericDatumReader.readRecord(java.lang.Object, org.apache.avro.Schema, org.apache.avro.Schema, org.apache.avro.io.Decoder)
to retrieve a
record field value from a reused instance. The default implementation is
for GenericRecord
.
- Overrides:
getField
in class ReflectDatumReader
removeField
protected void removeField(Object record,
String field,
int position)
- Description copied from class:
GenericDatumReader
- Called by the default implementation of
GenericDatumReader.readRecord(java.lang.Object, org.apache.avro.Schema, org.apache.avro.Schema, org.apache.avro.io.Decoder)
to remove a
record field value from a reused instance. The default implementation is
for GenericRecord
.
- Overrides:
removeField
in class ReflectDatumReader
Copyright © 2009 The Apache Software Foundation