org.apache.avro.io
Interface DatumReader<D>

All Known Implementing Classes:
GenericDatumReader, ReflectDatumReader, SpecificDatumReader

public interface DatumReader<D>

Read data of a schema.

Determines the in-memory data representation.


Method Summary
 D read(D reuse, Decoder in)
          Read a datum.
 void setSchema(Schema schema)
          Set the writer's schema.
 

Method Detail

setSchema

void setSchema(Schema schema)
Set the writer's schema.


read

D read(D reuse,
       Decoder in)
       throws IOException
Read a datum. Traverse the schema, depth-first, reading all leaf values in the schema into a datum that is returned. If the provided datum is non-null it may be reused and returned.

Throws:
IOException


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.