org.apache.avro.specific
Class SpecificDatumWriter<T>

java.lang.Object
  extended by org.apache.avro.generic.GenericDatumWriter<T>
      extended by 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.


Constructor Summary
  SpecificDatumWriter()
           
  SpecificDatumWriter(Class<T> c)
           
  SpecificDatumWriter(Schema schema)
           
protected SpecificDatumWriter(Schema root, SpecificData specificData)
           
protected SpecificDatumWriter(SpecificData specificData)
           
 
Method Summary
protected  void writeEnum(Schema schema, Object datum, Encoder out)
          Called to write an enum value.
 
Methods inherited from class org.apache.avro.generic.GenericDatumWriter
getArrayElements, getArraySize, getData, getMapEntries, getMapSize, npe, 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
 

Constructor Detail

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)
Method Detail

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 © 2011 The Apache Software Foundation. All Rights Reserved.