Package io.debezium.data
Class Bits
- java.lang.Object
-
- io.debezium.data.Bits
-
public class Bits extends Object
A set of bits of arbitrary length.- Author:
- Randall Hauch
-
-
Field Summary
Fields Modifier and Type Field Description static String
LENGTH_FIELD
static String
LOGICAL_NAME
-
Constructor Summary
Constructors Constructor Description Bits()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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 Detail
-
LOGICAL_NAME
public static final String LOGICAL_NAME
- See Also:
- Constant Field Values
-
LENGTH_FIELD
public static final String LENGTH_FIELD
- See Also:
- Constant Field Values
-
-
Method Detail
-
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:
builder(int)
-
fromBitSet
public 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.- Parameters:
schema
- the schemavalue
- the logical value- Returns:
- the encoded value
-
toBitSet
public static BitSet toBitSet(org.apache.kafka.connect.data.Schema schema, byte[] value)
-
-