org.apache.avro.specific
Class SpecificDatumWriter<T>
java.lang.Object
org.apache.avro.generic.GenericDatumWriter<T>
org.apache.avro.specific.SpecificDatumWriter<T>
- All Implemented Interfaces:
- DatumWriter<T>
- Direct Known Subclasses:
- ReflectDatumWriter
public class SpecificDatumWriter<T>
- extends GenericDatumWriter<T>
DatumWriter
for generated Java classes.
Methods inherited from class org.apache.avro.generic.GenericDatumWriter |
getArrayElements, getArraySize, getMapEntries, getMapSize, setSchema, write, write, writeArray, writeBytes, writeFixed, writeMap, writeRecord, writeString, writeString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SpecificDatumWriter
public SpecificDatumWriter()
SpecificDatumWriter
public SpecificDatumWriter(Class<T> c)
SpecificDatumWriter
public SpecificDatumWriter(Schema schema)
SpecificDatumWriter
protected SpecificDatumWriter(Schema root,
SpecificData specificData)
SpecificDatumWriter
protected SpecificDatumWriter(SpecificData specificData)
getField
protected Object getField(Object record,
String name,
int position)
- Description copied from class:
GenericDatumWriter
- Called by the default implementation of
GenericDatumWriter.writeRecord(org.apache.avro.Schema, java.lang.Object, org.apache.avro.io.Encoder)
to retrieve
a record field value. The default implementation is for IndexedRecord
.
- Overrides:
getField
in class GenericDatumWriter<T>
writeEnum
protected void writeEnum(Schema schema,
Object datum,
Encoder out)
throws IOException
- Description copied from class:
GenericDatumWriter
- Called to write an enum value. May be overridden for alternate enum
representations.
- Overrides:
writeEnum
in class GenericDatumWriter<T>
- Throws:
IOException
Copyright © 2010 The Apache Software Foundation