Package io.debezium.data
Class Bits
java.lang.Object
io.debezium.data.Bits
A set of bits of arbitrary length.
- Author:
- Randall Hauch
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.kafka.connect.data.SchemaBuilder
builder
(int length) Returns aSchemaBuilder
for a Bits.static byte[]
fromBitSet
(org.apache.kafka.connect.data.Schema schema, BitSet value) Convert a value from its logical format (BitSet) to it's encoded format.static org.apache.kafka.connect.data.Schema
schema
(int length) Returns a Schema for a Bits but with all other default Schema settings.static BitSet
toBitSet
(org.apache.kafka.connect.data.Schema schema, byte[] value)
-
Field Details
-
LOGICAL_NAME
- See Also:
-
LENGTH_FIELD
- See Also:
-
SCHEMA_VERSION
public static final int SCHEMA_VERSION- See Also:
-
-
Constructor Details
-
Bits
public Bits()
-
-
Method Details
-
builder
public static org.apache.kafka.connect.data.SchemaBuilder builder(int length) Returns aSchemaBuilder
for a Bits. You can use the resulting SchemaBuilder to set additional schema settings such as required/optional, default value, and documentation.- Parameters:
length
- maximum the number of bits in the set- Returns:
- the schema builder
-
schema
public static org.apache.kafka.connect.data.Schema schema(int length) Returns a Schema for a Bits but with all other default Schema settings.- Parameters:
length
- maximum the number of bits in the set- Returns:
- the schema
- See Also:
-
fromBitSet
Convert a value from its logical format (BitSet) to it's encoded format.- Parameters:
schema
- the schemavalue
- the logical value- Returns:
- the encoded value
-
toBitSet
-