KafkaBytesBuilder class
Bytes builder specific to Kafka protocol.
Provides convenient methods for writing all Kafka data types (and some more): int8, int16, int32, string, bytes, array.
Constructors
- KafkaBytesBuilder()
- Creates new builder with empty buffer.
- KafkaBytesBuilder.withRequestHeader(int apiKey, int apiVersion, int correlationId)
- Creates new builder and initializes buffer with proper request header.
Properties
Methods
-
addArray(
Iterable items, KafkaType itemType) → void - Adds Kafka array to this bytes builder.
-
addBytes(
List< int> ? value) → void - Adds value of Kafka-specific Bytes type to this builder.
-
addInt16(
int value) → void - Adds 16 bit integer to this buffer.
-
addInt32(
int value) → void - Adds 32 bit integer to this buffer.
-
addInt64(
int value) → void - Adds 64 bit integer to this buffer.
-
addInt8(
int value) → void - Adds 8 bit integer to this buffer.
-
addRaw(
List< int> data) → void - Adds arbitrary data to this buffer.
-
addString(
String value) → void - Adds Kafka string to this bytes builder.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
takeBytes(
) → List< int> -
toBytes(
) → List< int> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited