C# Class Avro.BinaryDecoder

Read leaf values.
Inheritance: Decoder
Show file Open project: thirumg/Avro.NET

Public Properties

Property Type Description
Instance BinaryDecoder

Public Methods

Method Description
ReadArrayStart ( Stream stream ) : long
ReadBool ( Stream Stream ) : bool

a boolean is written as a single byte whose value is either 0 (false) or 1 (true).

ReadBytes ( Stream Stream ) : byte[]

Bytes are encoded as a long followed by that many bytes of data.

ReadDouble ( Stream Stream ) : double

A double is written as 8 bytes. The double is converted into a 64-bit integer using a method equivalent to Java's doubleToLongBits and then encoded in little-endian format.

ReadFixed ( Stream Stream, byte buffer ) : void
ReadFloat ( Stream Stream ) : float

A float is written as 4 bytes. The float is converted into a 32-bit integer using a method equivalent to Java's floatToIntBits and then encoded in little-endian format.

ReadInt ( Stream Stream ) : int

int and long values are written using variable-length, zig-zag coding.

ReadLong ( Stream Stream ) : long

int and long values are written using variable-length, zig-zag coding.

ReadMapStart ( Stream Stream ) : long
ReadNull ( ) : object

null is written as zero bytes

ReadString ( Stream Stream ) : string
SkipBoolean ( Stream Stream ) : void
SkipBytes ( Stream Stream ) : void
SkipDouble ( Stream Stream ) : void
SkipFloat ( Stream Stream ) : void
SkipInt ( Stream Stream ) : void
SkipLong ( Stream Stream ) : void
SkipNull ( Stream Stream ) : void
SkipString ( Stream Stream ) : void
intBitsToFloat ( int value ) : float

Protected Methods

Method Description
doReadItemCount ( Stream Stream ) : long

Private Methods

Method Description
ReadFixed ( Stream Stream, byte buffer, int start, int length ) : void
Skip ( Stream Stream, int p ) : void
Skip ( Stream Stream, long p ) : void
ord ( byte p ) : byte
read ( Stream Stream ) : byte
read ( Stream Stream, long p ) : byte[]
skip ( long block_size ) : void

Method Details

ReadArrayStart() public method

public ReadArrayStart ( Stream stream ) : long
stream Stream
return long

ReadBool() public method

a boolean is written as a single byte whose value is either 0 (false) or 1 (true).
public ReadBool ( Stream Stream ) : bool
Stream Stream
return bool

ReadBytes() public method

Bytes are encoded as a long followed by that many bytes of data.
public ReadBytes ( Stream Stream ) : byte[]
Stream Stream
return byte[]

ReadDouble() public method

A double is written as 8 bytes. The double is converted into a 64-bit integer using a method equivalent to Java's doubleToLongBits and then encoded in little-endian format.
public ReadDouble ( Stream Stream ) : double
Stream Stream
return double

ReadFixed() public method

public ReadFixed ( Stream Stream, byte buffer ) : void
Stream Stream
buffer byte
return void

ReadFloat() public method

A float is written as 4 bytes. The float is converted into a 32-bit integer using a method equivalent to Java's floatToIntBits and then encoded in little-endian format.
public ReadFloat ( Stream Stream ) : float
Stream Stream
return float

ReadInt() public method

int and long values are written using variable-length, zig-zag coding.
public ReadInt ( Stream Stream ) : int
Stream Stream
return int

ReadLong() public method

int and long values are written using variable-length, zig-zag coding.
public ReadLong ( Stream Stream ) : long
Stream Stream
return long

ReadMapStart() public method

public ReadMapStart ( Stream Stream ) : long
Stream Stream
return long

ReadNull() public method

null is written as zero bytes
public ReadNull ( ) : object
return object

ReadString() public method

public ReadString ( Stream Stream ) : string
Stream Stream
return string

SkipBoolean() public method

public SkipBoolean ( Stream Stream ) : void
Stream Stream
return void

SkipBytes() public method

public SkipBytes ( Stream Stream ) : void
Stream Stream
return void

SkipDouble() public method

public SkipDouble ( Stream Stream ) : void
Stream Stream
return void

SkipFloat() public method

public SkipFloat ( Stream Stream ) : void
Stream Stream
return void

SkipInt() public method

public SkipInt ( Stream Stream ) : void
Stream Stream
return void

SkipLong() public method

public SkipLong ( Stream Stream ) : void
Stream Stream
return void

SkipNull() public method

public SkipNull ( Stream Stream ) : void
Stream Stream
return void

SkipString() public method

public SkipString ( Stream Stream ) : void
Stream Stream
return void

doReadItemCount() protected method

protected doReadItemCount ( Stream Stream ) : long
Stream Stream
return long

intBitsToFloat() public static method

public static intBitsToFloat ( int value ) : float
value int
return float

Property Details

Instance public static property

public static BinaryDecoder Instance
return BinaryDecoder