Interface DatumReader<D>

All Known Subinterfaces:
FastReaderBuilder.FieldReader, FastReaderBuilder.ReusingFieldReader
All Known Implementing Classes:
FastReaderBuilder.MapReader, FastReaderBuilder.RecordReader, GenericDatumReader, Json.ObjectReader, ProtobufDatumReader, ReflectDatumReader, SpecificDatumReader, ThriftDatumReader

public interface DatumReader<D>
Read data of a schema.

Determines the in-memory data representation.

  • Method Summary

    Modifier and Type
    Method
    Description
    read(D reuse, Decoder in)
    Read a datum.
    void
    setSchema(Schema schema)
    Set the writer's schema.
  • Method Details

    • 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