Avro C#
Public Member Functions
Avro::IO::Decoder Interface Reference

Decoder is used to decode Avro data on a stream. There are methods to read the Avro types on the stream. There are also methods to skip items, which are usually more efficient than reading, on the stream. More...

Inheritance diagram for Avro::IO::Decoder:
Avro::IO::BinaryDecoder

List of all members.

Public Member Functions

void ReadNull ()
 Reads a null Avro type.
bool ReadBoolean ()
 Read a boolean Avro type.
int ReadInt ()
 Reads an int Avro type.
long ReadLong ()
 Reads a long Avro type.
float ReadFloat ()
 Reads a float Avro type.
double ReadDouble ()
 Reads a double Avro type.
byte[] ReadBytes ()
 Reads the bytes Avro type.
string ReadString ()
 Reads a string Avro type.
int ReadEnum ()
 Reads an enum AvroType.
long ReadArrayStart ()
 Starts reading the array Avro type. This, together with ReadArrayNext() is used to read the items from Avro array. This returns the number of entries in the initial chunk. After consuming the chunk, the client should call ReadArrayNext() to get the number of entries in the next chunk. The client should repeat the procedure until there are no more entries in the array.
long ReadArrayNext ()
 See ReadArrayStart().
long ReadMapStart ()
 Starts reading the map Avro type. This, together with ReadMapNext() is used to read the entries from Avro map. This returns the number of entries in the initial chunk. After consuming the chunk, the client should call ReadMapNext() to get the number of entriess in the next chunk. The client should repeat the procedure until there are no more entries in the array. for (int n = decoder.ReadMapStart(); n > 0; n = decoder.ReadMapNext()) { Read one map entry. }.
long ReadMapNext ()
 See ReadMapStart().
int ReadUnionIndex ()
 Reads the index, which determines the type in an union Avro type.
void ReadFixed (byte[] buffer)
 A convenience method for ReadFixed(buffer, 0, buffer.Length);.
void ReadFixed (byte[] buffer, int start, int length)
 Read a Fixed Avro type of length.
void SkipNull ()
 Skips a null Avro type on the stream.
void SkipBoolean ()
 Skips a boolean Avro type on the stream.
void SkipInt ()
 Skips a int Avro type on the stream.
void SkipLong ()
 Skips a long Avro type on the stream.
void SkipFloat ()
 Skips a float Avro type on the stream.
void SkipDouble ()
 Skips a double Avro type on the stream.
void SkipBytes ()
 Skips a bytes Avro type on the stream.
void SkipString ()
 Skips a string Avro type on the stream.
void SkipEnum ()
void SkipUnionIndex ()
void SkipFixed (int len)

Detailed Description

Decoder is used to decode Avro data on a stream. There are methods to read the Avro types on the stream. There are also methods to skip items, which are usually more efficient than reading, on the stream.


Member Function Documentation

long Avro::IO::Decoder::ReadArrayNext ( )

See ReadArrayStart().

Returns:
The number of array entries in the next chunk, 0 if there are no more entries.

Implemented in Avro::IO::BinaryDecoder.

long Avro::IO::Decoder::ReadArrayStart ( )

Starts reading the array Avro type. This, together with ReadArrayNext() is used to read the items from Avro array. This returns the number of entries in the initial chunk. After consuming the chunk, the client should call ReadArrayNext() to get the number of entries in the next chunk. The client should repeat the procedure until there are no more entries in the array.

for (int n = decoder.ReadArrayStart(); n > 0; n = decoder.ReadArrayNext()) { Read one array entry. }

Returns:
The number of entries in the initial chunk, 0 if the array is empty.

Implemented in Avro::IO::BinaryDecoder.

bool Avro::IO::Decoder::ReadBoolean ( )

Read a boolean Avro type.

Returns:
The boolean just read

Implemented in Avro::IO::BinaryDecoder.

byte [] Avro::IO::Decoder::ReadBytes ( )

Reads the bytes Avro type.

Returns:
The bytes just read

Implemented in Avro::IO::BinaryDecoder.

double Avro::IO::Decoder::ReadDouble ( )

Reads a double Avro type.

Returns:
The double just read

Implemented in Avro::IO::BinaryDecoder.

int Avro::IO::Decoder::ReadEnum ( )

Reads an enum AvroType.

Returns:
The enum just read

Implemented in Avro::IO::BinaryDecoder.

void Avro::IO::Decoder::ReadFixed ( byte[]  buffer,
int  start,
int  length 
)

Read a Fixed Avro type of length.

Parameters:
bufferBuffer to read into
startStarting position of buffer to read into
lengthNumber of bytes to read

Implemented in Avro::IO::BinaryDecoder.

void Avro::IO::Decoder::ReadFixed ( byte[]  buffer)

A convenience method for ReadFixed(buffer, 0, buffer.Length);.

Parameters:
bufferThe buffer to read into.

Implemented in Avro::IO::BinaryDecoder.

float Avro::IO::Decoder::ReadFloat ( )

Reads a float Avro type.

Returns:
The float just read

Implemented in Avro::IO::BinaryDecoder.

int Avro::IO::Decoder::ReadInt ( )

Reads an int Avro type.

Returns:
The int just read

Implemented in Avro::IO::BinaryDecoder.

long Avro::IO::Decoder::ReadLong ( )

Reads a long Avro type.

Returns:
The long just read

Implemented in Avro::IO::BinaryDecoder.

long Avro::IO::Decoder::ReadMapNext ( )

See ReadMapStart().

Returns:
The number of map entries in the next chunk, 0 if there are no more entries.

Implemented in Avro::IO::BinaryDecoder.

long Avro::IO::Decoder::ReadMapStart ( )

Starts reading the map Avro type. This, together with ReadMapNext() is used to read the entries from Avro map. This returns the number of entries in the initial chunk. After consuming the chunk, the client should call ReadMapNext() to get the number of entriess in the next chunk. The client should repeat the procedure until there are no more entries in the array. for (int n = decoder.ReadMapStart(); n > 0; n = decoder.ReadMapNext()) { Read one map entry. }.

Returns:
The number of entries in the initial chunk, 0 if the map is empty.

Implemented in Avro::IO::BinaryDecoder.

void Avro::IO::Decoder::ReadNull ( )

Reads a null Avro type.

Implemented in Avro::IO::BinaryDecoder.

string Avro::IO::Decoder::ReadString ( )

Reads a string Avro type.

Returns:
The string just read

Implemented in Avro::IO::BinaryDecoder.

int Avro::IO::Decoder::ReadUnionIndex ( )

Reads the index, which determines the type in an union Avro type.

Returns:
The index of the type within the union.

Implemented in Avro::IO::BinaryDecoder.

void Avro::IO::Decoder::SkipBoolean ( )

Skips a boolean Avro type on the stream.

Implemented in Avro::IO::BinaryDecoder.

void Avro::IO::Decoder::SkipBytes ( )

Skips a bytes Avro type on the stream.

Implemented in Avro::IO::BinaryDecoder.

void Avro::IO::Decoder::SkipDouble ( )

Skips a double Avro type on the stream.

Implemented in Avro::IO::BinaryDecoder.

void Avro::IO::Decoder::SkipFloat ( )

Skips a float Avro type on the stream.

Implemented in Avro::IO::BinaryDecoder.

void Avro::IO::Decoder::SkipInt ( )

Skips a int Avro type on the stream.

Implemented in Avro::IO::BinaryDecoder.

void Avro::IO::Decoder::SkipLong ( )

Skips a long Avro type on the stream.

Implemented in Avro::IO::BinaryDecoder.

void Avro::IO::Decoder::SkipNull ( )

Skips a null Avro type on the stream.

Implemented in Avro::IO::BinaryDecoder.

void Avro::IO::Decoder::SkipString ( )

Skips a string Avro type on the stream.

Implemented in Avro::IO::BinaryDecoder.


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