Avro C#
|
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...
Public Member Functions | |
void | ReadNull () |
Reads a null Avro type. More... | |
bool | ReadBoolean () |
Read a boolean Avro type More... | |
int | ReadInt () |
Reads an int Avro type. More... | |
long | ReadLong () |
Reads a long Avro type. More... | |
float | ReadFloat () |
Reads a float Avro type More... | |
double | ReadDouble () |
Reads a double Avro type More... | |
byte[] | ReadBytes () |
Reads the bytes Avro type More... | |
string | ReadString () |
Reads a string Avro type More... | |
int | ReadEnum () |
Reads an enum AvroType More... | |
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. More... | |
long | ReadArrayNext () |
See ReadArrayStart(). More... | |
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 entries 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. } More... | |
long | ReadMapNext () |
See ReadMapStart(). More... | |
int | ReadUnionIndex () |
Reads the index, which determines the type in an union Avro type. More... | |
void | ReadFixed (byte[] buffer) |
A convenience method for ReadFixed(buffer, 0, buffer.Length); More... | |
void | ReadFixed (byte[] buffer, int start, int length) |
Read a Fixed Avro type of length. More... | |
void | SkipNull () |
Skips a null Avro type on the stream. More... | |
void | SkipBoolean () |
Skips a boolean Avro type on the stream. More... | |
void | SkipInt () |
Skips a int Avro type on the stream. More... | |
void | SkipLong () |
Skips a long Avro type on the stream. More... | |
void | SkipFloat () |
Skips a float Avro type on the stream. More... | |
void | SkipDouble () |
Skips a double Avro type on the stream. More... | |
void | SkipBytes () |
Skips a bytes Avro type on the stream. More... | |
void | SkipString () |
Skips a string Avro type on the stream. More... | |
void | SkipEnum () |
Skips an enumeration. More... | |
void | SkipUnionIndex () |
Skips a union tag index. More... | |
void | SkipFixed (int len) |
Skips a fixed of a specified length. More... | |
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.
long Avro.IO.Decoder.ReadArrayNext | ( | ) |
See ReadArrayStart().
Implemented in Avro.IO.JsonDecoder, Avro.IO.BinaryDecoder, and Avro.IO.ParsingDecoder.
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. }
Implemented in Avro.IO.JsonDecoder, Avro.IO.BinaryDecoder, and Avro.IO.ParsingDecoder.
bool Avro.IO.Decoder.ReadBoolean | ( | ) |
Read a boolean Avro type
Implemented in Avro.IO.JsonDecoder, Avro.IO.BinaryDecoder, and Avro.IO.ParsingDecoder.
byte [] Avro.IO.Decoder.ReadBytes | ( | ) |
Reads the bytes Avro type
Implemented in Avro.IO.JsonDecoder, Avro.IO.BinaryDecoder, and Avro.IO.ParsingDecoder.
double Avro.IO.Decoder.ReadDouble | ( | ) |
Reads a double Avro type
Implemented in Avro.IO.JsonDecoder, Avro.IO.BinaryDecoder, Avro.IO.BinaryDecoder, and Avro.IO.ParsingDecoder.
int Avro.IO.Decoder.ReadEnum | ( | ) |
Reads an enum AvroType
Implemented in Avro.IO.JsonDecoder, Avro.IO.BinaryDecoder, and Avro.IO.ParsingDecoder.
void Avro.IO.Decoder.ReadFixed | ( | byte[] | buffer | ) |
A convenience method for ReadFixed(buffer, 0, buffer.Length);
buffer | The buffer to read into. |
Implemented in Avro.IO.JsonDecoder, Avro.IO.BinaryDecoder, and Avro.IO.ParsingDecoder.
void Avro.IO.Decoder.ReadFixed | ( | byte[] | buffer, |
int | start, | ||
int | length | ||
) |
Read a Fixed Avro type of length.
buffer | Buffer to read into |
start | Starting position of buffer to read into |
length | Number of bytes to read |
Implemented in Avro.IO.JsonDecoder, Avro.IO.BinaryDecoder, and Avro.IO.ParsingDecoder.
float Avro.IO.Decoder.ReadFloat | ( | ) |
Reads a float Avro type
Implemented in Avro.IO.JsonDecoder, Avro.IO.ParsingDecoder, Avro.IO.BinaryDecoder, and Avro.IO.BinaryDecoder.
int Avro.IO.Decoder.ReadInt | ( | ) |
Reads an int Avro type.
Implemented in Avro.IO.JsonDecoder, Avro.IO.BinaryDecoder, and Avro.IO.ParsingDecoder.
long Avro.IO.Decoder.ReadLong | ( | ) |
Reads a long Avro type.
Implemented in Avro.IO.JsonDecoder, Avro.IO.BinaryDecoder, and Avro.IO.ParsingDecoder.
long Avro.IO.Decoder.ReadMapNext | ( | ) |
See ReadMapStart().
Implemented in Avro.IO.JsonDecoder, Avro.IO.BinaryDecoder, and Avro.IO.ParsingDecoder.
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 entries 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. }
Implemented in Avro.IO.JsonDecoder, Avro.IO.BinaryDecoder, and Avro.IO.ParsingDecoder.
void Avro.IO.Decoder.ReadNull | ( | ) |
Reads a null Avro type.
Implemented in Avro.IO.JsonDecoder, Avro.IO.BinaryDecoder, and Avro.IO.ParsingDecoder.
string Avro.IO.Decoder.ReadString | ( | ) |
Reads a string Avro type
Implemented in Avro.IO.JsonDecoder, Avro.IO.BinaryDecoder, Avro.IO.BinaryDecoder, and Avro.IO.ParsingDecoder.
int Avro.IO.Decoder.ReadUnionIndex | ( | ) |
Reads the index, which determines the type in an union Avro type.
Implemented in Avro.IO.JsonDecoder, Avro.IO.BinaryDecoder, and Avro.IO.ParsingDecoder.
void Avro.IO.Decoder.SkipBoolean | ( | ) |
Skips a boolean Avro type on the stream.
Implemented in Avro.IO.JsonDecoder, Avro.IO.BinaryDecoder, and Avro.IO.ParsingDecoder.
void Avro.IO.Decoder.SkipBytes | ( | ) |
Skips a bytes Avro type on the stream.
Implemented in Avro.IO.JsonDecoder, Avro.IO.BinaryDecoder, and Avro.IO.ParsingDecoder.
void Avro.IO.Decoder.SkipDouble | ( | ) |
Skips a double Avro type on the stream.
Implemented in Avro.IO.JsonDecoder, Avro.IO.BinaryDecoder, and Avro.IO.ParsingDecoder.
void Avro.IO.Decoder.SkipEnum | ( | ) |
Skips an enumeration.
Implemented in Avro.IO.JsonDecoder, Avro.IO.BinaryDecoder, and Avro.IO.ParsingDecoder.
void Avro.IO.Decoder.SkipFixed | ( | int | len | ) |
Skips a fixed of a specified length.
len | Length of the fixed. |
Implemented in Avro.IO.JsonDecoder, Avro.IO.BinaryDecoder, and Avro.IO.ParsingDecoder.
void Avro.IO.Decoder.SkipFloat | ( | ) |
Skips a float Avro type on the stream.
Implemented in Avro.IO.JsonDecoder, Avro.IO.BinaryDecoder, and Avro.IO.ParsingDecoder.
void Avro.IO.Decoder.SkipInt | ( | ) |
Skips a int Avro type on the stream.
Implemented in Avro.IO.JsonDecoder, Avro.IO.BinaryDecoder, and Avro.IO.ParsingDecoder.
void Avro.IO.Decoder.SkipLong | ( | ) |
Skips a long Avro type on the stream.
Implemented in Avro.IO.JsonDecoder, Avro.IO.BinaryDecoder, and Avro.IO.ParsingDecoder.
void Avro.IO.Decoder.SkipNull | ( | ) |
Skips a null Avro type on the stream.
Implemented in Avro.IO.JsonDecoder, Avro.IO.BinaryDecoder, and Avro.IO.ParsingDecoder.
void Avro.IO.Decoder.SkipString | ( | ) |
Skips a string Avro type on the stream.
Implemented in Avro.IO.BinaryDecoder, Avro.IO.JsonDecoder, and Avro.IO.ParsingDecoder.
void Avro.IO.Decoder.SkipUnionIndex | ( | ) |
Skips a union tag index.
Implemented in Avro.IO.JsonDecoder, Avro.IO.BinaryDecoder, and Avro.IO.ParsingDecoder.