Package org.apache.avro.protobuf

# Class ProtobufDatumReader<T>

java.lang.Object
org.apache.avro.generic.GenericDatumReader<T>
org.apache.avro.protobuf.ProtobufDatumReader<T>

All Implemented Interfaces:
  `org.apache.avro.io.DatumReader<T>`

public class ProtobufDatumReader<T> extends org.apache.avro.generic.GenericDatumReader<T>
`DatumReader` for generated Protobuf classes.

## Constructor Summary

Constructors
Modifier
Constructor
Description
``
`ProtobufDatumReader()`
``
`ProtobufDatumReader(Class<T> c)`
``
`ProtobufDatumReader(org.apache.avro.Schema schema)`
Construct where the writer's and reader's schemas are the same.
``
`ProtobufDatumReader(org.apache.avro.Schema writer, org.apache.avro.Schema reader)`
Construct given writer's and reader's schema.
`protected`
`ProtobufDatumReader(org.apache.avro.Schema writer, org.apache.avro.Schema reader, ProtobufData data)`

## Method Summary

Modifier and Type
Method
Description
`protected Object`
`createEnum(String symbol, org.apache.avro.Schema schema)`
`protected Object`
`readBytes(Object old, org.apache.avro.io.Decoder in)`
`protected Object`
`readRecord(Object old, org.apache.avro.Schema expected, org.apache.avro.io.ResolvingDecoder in)`

### Methods inherited from class org.apache.avro.generic.GenericDatumReader

`addToArray, addToMap, convert, createBytes, createFixed, createFixed, createString, findStringClass, getData, getExpected, getResolver, getSchema, newArray, newInstanceFromString, newMap, newRecord, peekArray, read, read, readArray, readBytes, readEnum, readField, readFixed, readInt, readMap, readMapKey, readString, readString, readWithConversion, readWithoutConversion, setExpected, setSchema, skip`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### ProtobufDatumReader

public ProtobufDatumReader()

### ProtobufDatumReader

public ProtobufDatumReader(Class<T> c)

### ProtobufDatumReader

public ProtobufDatumReader(org.apache.avro.Schema schema)
Construct where the writer's and reader's schemas are the same.

### ProtobufDatumReader

public ProtobufDatumReader(org.apache.avro.Schema writer, org.apache.avro.Schema reader)
Construct given writer's and reader's schema.

### ProtobufDatumReader

protected ProtobufDatumReader(org.apache.avro.Schema writer, org.apache.avro.Schema reader, ProtobufData data)

## Method Details

### readRecord

protected Object readRecord(Object old, org.apache.avro.Schema expected, org.apache.avro.io.ResolvingDecoder in) throws IOException

Overrides:
  `readRecord` in class `org.apache.avro.generic.GenericDatumReader<T>`
Throws:
  `IOException`

### createEnum

protected Object createEnum(String symbol, org.apache.avro.Schema schema)

Overrides:
  `createEnum` in class `org.apache.avro.generic.GenericDatumReader<T>`

### readBytes

protected Object readBytes(Object old, org.apache.avro.io.Decoder in) throws IOException

Overrides:
  `readBytes` in class `org.apache.avro.generic.GenericDatumReader<T>`
Throws:
  `IOException`