C# Class Kafka.Client.Serialization.KafkaBinaryWriter

Writes data into underlying stream using big endian bytes order for primitive types and UTF-8 encoding for strings.
Inheritance: System.IO.BinaryWriter
ファイルを表示 Open project: precog/kafka Class Usage Examples

Public Methods

Method Description
KafkaBinaryWriter ( Stream output ) : System.IO

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

Write ( int value ) : void

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

Write ( long value ) : void

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

Write ( short value ) : void

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

WriteTopic ( string topic, string encoding ) : void

Writes topic and his size into underlying stream using given encoding.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Flushes data into stream and resets position pointer.

KafkaBinaryWriter ( ) : System.IO

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

Method Details

Dispose() protected method

Flushes data into stream and resets position pointer.
protected Dispose ( bool disposing ) : void
disposing bool /// Not used ///
return void

KafkaBinaryWriter() protected method

Initializes a new instance of the KafkaBinaryWriter class using big endian bytes order for primive types and UTF-8 encoding for strings.
protected KafkaBinaryWriter ( ) : System.IO
return System.IO

KafkaBinaryWriter() public method

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

Write() public method

Writes four-bytes signed integer to the current stream using big endian bytes order and advances the stream position by four bytes
public Write ( int value ) : void
value int /// The value to write. ///
return void

Write() public method

Writes eight-bytes signed integer to the current stream using big endian bytes order and advances the stream position by eight bytes
public Write ( long value ) : void
value long /// The value to write. ///
return void

Write() public method

Writes two-bytes signed integer to the current stream using big endian bytes order and advances the stream position by two bytes
public Write ( short value ) : void
value short /// The value to write. ///
return void

WriteTopic() public method

Writes topic and his size into underlying stream using given encoding.
public WriteTopic ( string topic, string encoding ) : void
topic string /// The topic to write. ///
encoding string /// The encoding to use. ///
return void