Class Bits


  • public class Bits
    extends Object
    A set of bits of arbitrary length.
    Author:
    Randall Hauch
    • Constructor Detail

      • Bits

        public Bits()
    • Method Detail

      • builder

        public static org.apache.kafka.connect.data.SchemaBuilder builder​(int length)
        Returns a SchemaBuilder 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 schema
        value - the logical value
        Returns:
        the encoded value
      • toBitSet

        public static BitSet toBitSet​(org.apache.kafka.connect.data.Schema schema,
                                      byte[] value)