BufferBitSet { public static boolean get(@NotNull final Buffer buf, final long bufferOffset, final int i) { assert bufferOffset <= buf.limit() - (i / Long.SIZE + 1) * Long.BYTES; final long word = i >> 6; final long bit = i & 0x3f; final long mask = 1L << bit; return (buf.getLong(bufferOffset + word * Long.BYTES) & mask) != 0; }  static boolean get(@NotNull final Buffer buf,
                              final long bufferOffset,
                              final int i); static int nextSetBit(@NotNull final Buffer buf,
                                 final long bufferOffset,
                                 final int sizeHint,
                                 final int fromIndexInclusive); static int cardinalityTo(@NotNull final Buffer buf,
                                    final long bufferOffset,
                                    final int bitIndex); static int arraySize(final int bitCount);  }
@Test public void get() { assertTrue(BufferBitSet.get(bitsetBuffer, 0, 0)); assertTrue(BufferBitSet.get(bitsetBuffer, 0, 2)); assertTrue(BufferBitSet.get(bitsetBuffer, 0, 65)); assertTrue(BufferBitSet.get(bitsetBuffer, 0, 127)); assertFalse(BufferBitSet.get(bitsetBuffer, 0, 1)); assertFalse(BufferBitSet.get(bitsetBuffer, 0, 63)); assertFalse(BufferBitSet.get(bitsetBuffer, 0, 64)); assertFalse(BufferBitSet.get(bitsetBuffer, 0, 126)); }