Avro C#
 All Classes Namespaces Functions Variables Enumerations Properties
Public Member Functions | Protected Member Functions
Avro.Specific.SpecificDefaultReader Class Reference

Reader class for reading data and storing into specific classes. More...

Inheritance diagram for Avro.Specific.SpecificDefaultReader:
Avro.Generic.DefaultReader

List of all members.

Public Member Functions

 SpecificDefaultReader (Schema writerSchema, Schema readerSchema)
 Constructor.

Protected Member Functions

override object ReadRecord (object reuse, RecordSchema writerSchema, Schema readerSchema, Decoder dec)
 Deserializes a record from the stream.
override object ReadFixed (object reuse, FixedSchema writerSchema, Schema readerSchema, Decoder d)
 Deserializes a fixed object and returns the object. The default implementation uses CreateFixed() and GetFixedBuffer() and returns what CreateFixed() returned.
override object ReadEnum (object reuse, EnumSchema writerSchema, Schema readerSchema, Decoder dec)
 Reads an enum from the given decoder.
override object ReadArray (object reuse, ArraySchema writerSchema, Schema readerSchema, Decoder dec)
 Reads an array from the given decoder.
override object ReadMap (object reuse, MapSchema writerSchema, Schema readerSchema, Decoder d)
 Deserialized an avro map. The default implemenation creats a new map using CreateMap() and then adds elements to the map using AddMapEntry().
virtual string getTargetType (Schema schema)
 Gets the target type name in the given schema.

Detailed Description

Reader class for reading data and storing into specific classes.


Constructor & Destructor Documentation

Avro.Specific.SpecificDefaultReader.SpecificDefaultReader ( Schema  writerSchema,
Schema  readerSchema 
) [inline]

Constructor.

Parameters:
writerSchemaschema of the object that wrote the data
readerSchemaschema of the object that will store the data

Member Function Documentation

virtual string Avro.Specific.SpecificDefaultReader.getTargetType ( Schema  schema) [inline, protected, virtual]

Gets the target type name in the given schema.

Parameters:
schemaschema containing the type to be determined
nullibleused for union schema
Returns:
override object Avro.Specific.SpecificDefaultReader.ReadArray ( object  reuse,
ArraySchema  writerSchema,
Schema  readerSchema,
Decoder  dec 
) [inline, protected, virtual]

Reads an array from the given decoder.

Parameters:
reuseobject to store data read
writerSchemaschema of the object that wrote the data
readerSchemaschema of the object that will store the data
decdecoder object that contains the data to be read
Returns:
array

Reimplemented from Avro.Generic.DefaultReader.

override object Avro.Specific.SpecificDefaultReader.ReadEnum ( object  reuse,
EnumSchema  writerSchema,
Schema  readerSchema,
Decoder  dec 
) [inline, protected, virtual]

Reads an enum from the given decoder.

Parameters:
reuseobject to store data read
writerSchemaschema of the object that wrote the data
readerSchemaschema of the object that will store the data
decdecoder object that contains the data to be read
Returns:
enum value

Reimplemented from Avro.Generic.DefaultReader.

override object Avro.Specific.SpecificDefaultReader.ReadFixed ( object  reuse,
FixedSchema  writerSchema,
Schema  readerSchema,
Decoder  d 
) [inline, protected, virtual]

Deserializes a fixed object and returns the object. The default implementation uses CreateFixed() and GetFixedBuffer() and returns what CreateFixed() returned.

Parameters:
reuseIf appropriate, uses this object instead of creating a new one.
writerSchemaThe FixedSchema the writer used during serialization.
readerSchemaThe schema that the readr uses. Must be a FixedSchema with the same size as the writerSchema.
dThe decoder for deserialization.
Returns:
The deserilized object.

Reimplemented from Avro.Generic.DefaultReader.

override object Avro.Specific.SpecificDefaultReader.ReadMap ( object  reuse,
MapSchema  writerSchema,
Schema  readerSchema,
Decoder  d 
) [inline, protected, virtual]

Deserialized an avro map. The default implemenation creats a new map using CreateMap() and then adds elements to the map using AddMapEntry().

Parameters:
reuseIf appropriate, use this instead of creating a new map object.
writerSchemaThe schema the writer used to write the map.
readerSchemaThe schema the reader is using.
dThe decoder for serialization.
Returns:
The deserialized map object.

Reimplemented from Avro.Generic.DefaultReader.

override object Avro.Specific.SpecificDefaultReader.ReadRecord ( object  reuse,
RecordSchema  writerSchema,
Schema  readerSchema,
Decoder  dec 
) [inline, protected, virtual]

Deserializes a record from the stream.

Parameters:
reuseIf not null, a record object that could be reused for returning the result
writerSchemaThe writer's RecordSchema
readerSchemaThe reader's schema, must be RecordSchema too.
decThe decoder for deserialization
Returns:
The record object just read

Reimplemented from Avro.Generic.DefaultReader.


The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Enumerations Properties