C# Class Kafka.Client.Serialization.KafkaBinaryReader

Reads data from underlying stream using big endian bytes order for primitive types and UTF-8 encoding for strings.
Inheritance: System.IO.BinaryReader
显示文件 Open project: precog/kafka Class Usage Examples

Public Methods

Method Description
KafkaBinaryReader ( Stream input ) : System.IO

Initializes a new instance of the KafkaBinaryReader class using big endian bytes order for primive types and UTF-8 encoding for strings.

Read ( ) : int

Reads four-bytes signed integer from the current stream using big endian bytes order and advances the stream position by four bytes

ReadInt16 ( ) : short

Reads two-bytes signed integer from the current stream using big endian bytes order and advances the stream position by two bytes

ReadInt32 ( ) : int

Reads four-bytes signed integer from the current stream using big endian bytes order and advances the stream position by four bytes

ReadInt64 ( ) : long

Reads eight-bytes signed integer from the current stream using big endian bytes order and advances the stream position by eight bytes

ReadTopic ( string encoding ) : string

Reads fixed-length topic from underlying stream using given encoding.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Resets position pointer.

Method Details

Dispose() protected method

Resets position pointer.
protected Dispose ( bool disposing ) : void
disposing bool /// Not used ///
return void

KafkaBinaryReader() public method

Initializes a new instance of the KafkaBinaryReader class using big endian bytes order for primive types and UTF-8 encoding for strings.
public KafkaBinaryReader ( Stream input ) : System.IO
input System.IO.Stream /// The input stream. ///
return System.IO

Read() public method

Reads four-bytes signed integer from the current stream using big endian bytes order and advances the stream position by four bytes
public Read ( ) : int
return int

ReadInt16() public method

Reads two-bytes signed integer from the current stream using big endian bytes order and advances the stream position by two bytes
public ReadInt16 ( ) : short
return short

ReadInt32() public method

Reads four-bytes signed integer from the current stream using big endian bytes order and advances the stream position by four bytes
public ReadInt32 ( ) : int
return int

ReadInt64() public method

Reads eight-bytes signed integer from the current stream using big endian bytes order and advances the stream position by eight bytes
public ReadInt64 ( ) : long
return long

ReadTopic() public method

Reads fixed-length topic from underlying stream using given encoding.
public ReadTopic ( string encoding ) : string
encoding string /// The encoding to use. ///
return string