| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.avro.generic.GenericDatumWriter<T>
org.apache.avro.specific.SpecificDatumWriter<T>
org.apache.avro.reflect.ReflectDatumWriter<T>
public class ReflectDatumWriter<T>
DatumWriter for existing classes
 via Java reflection.
| Constructor Summary | |
|---|---|
  | 
ReflectDatumWriter()
 | 
  | 
ReflectDatumWriter(Class<T> c)
 | 
  | 
ReflectDatumWriter(Class<T> c,
                   ReflectData data)
 | 
protected  | 
ReflectDatumWriter(ReflectData reflectData)
 | 
  | 
ReflectDatumWriter(Schema root)
 | 
protected  | 
ReflectDatumWriter(Schema root,
                   ReflectData reflectData)
 | 
| Method Summary | |
|---|---|
protected  Iterator<Object> | 
getArrayElements(Object array)
Called by the default implementation of GenericDatumWriter.writeArray(org.apache.avro.Schema, java.lang.Object, org.apache.avro.io.Encoder) to enumerate
 array elements. | 
protected  long | 
getArraySize(Object array)
Called by the default implementation of GenericDatumWriter.writeArray(org.apache.avro.Schema, java.lang.Object, org.apache.avro.io.Encoder) to get the
 size of an array. | 
protected  void | 
write(Schema schema,
      Object datum,
      Encoder out)
Called to write data.  | 
protected  void | 
writeBytes(Object datum,
           Encoder out)
Called to write a bytes.  | 
protected  void | 
writeString(Schema schema,
            Object datum,
            Encoder out)
Called to write a string.  | 
| Methods inherited from class org.apache.avro.specific.SpecificDatumWriter | 
|---|
writeEnum | 
| Methods inherited from class org.apache.avro.generic.GenericDatumWriter | 
|---|
getData, getMapEntries, getMapSize, npe, setSchema, write, writeArray, writeFixed, writeMap, writeRecord, writeString | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public ReflectDatumWriter()
public ReflectDatumWriter(Class<T> c)
public ReflectDatumWriter(Class<T> c,
                          ReflectData data)
public ReflectDatumWriter(Schema root)
protected ReflectDatumWriter(Schema root,
                             ReflectData reflectData)
protected ReflectDatumWriter(ReflectData reflectData)
| Method Detail | 
|---|
protected long getArraySize(Object array)
GenericDatumWriterGenericDatumWriter.writeArray(org.apache.avro.Schema, java.lang.Object, org.apache.avro.io.Encoder) to get the
 size of an array.  The default implementation is for Collection.
getArraySize in class GenericDatumWriter<T>protected Iterator<Object> getArrayElements(Object array)
GenericDatumWriterGenericDatumWriter.writeArray(org.apache.avro.Schema, java.lang.Object, org.apache.avro.io.Encoder) to enumerate
 array elements.  The default implementation is for Collection.
getArrayElements in class GenericDatumWriter<T>
protected void writeString(Schema schema,
                           Object datum,
                           Encoder out)
                    throws IOException
GenericDatumWriter
writeString in class GenericDatumWriter<T>IOException
protected void writeBytes(Object datum,
                          Encoder out)
                   throws IOException
GenericDatumWriter
writeBytes in class GenericDatumWriter<T>IOException
protected void write(Schema schema,
                     Object datum,
                     Encoder out)
              throws IOException
GenericDatumWriter
write in class GenericDatumWriter<T>IOException
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||