Class BitSetCodec

  • All Implemented Interfaces:
    Codec<BitSet>, Decoder<BitSet>, Encoder<BitSet>

    public class BitSetCodec
    extends Object
    implements Codec<BitSet>
    Defines a codec for standard BitSet. BitSet is encoded/decoded a an array of long integers.

    For compatibility with the legacy MongoDB driver, the codec can also decode a BitSet from a document if it contains a key named "words" whose value is an array of longs. Note that this legacy format is only available when LOADING a BitSet. When persisting a BitSet, it is always stored as an array of long integers.