public static BitSet valueOf (LongBuffer lb)

Returns a new bit set containing all the bits in the given long buffer between its position and limit.

More precisely,
BitSet.valueOf(lb).get(n) == ((lb.get(lb.position()+n/64) & (1L<<(n%64))) != 0)
for all n < 64 * lb.remaining().

The long buffer is not modified by this method, and no reference to the buffer is retained by the bit set.

Parameters:
lb    a long buffer containing a little-endian representation of a sequence of bits between its position and limit, to be used as the initial bits of the new bit set

Returns:  a BitSet containing all the bits in the buffer in the specified range

Since:  1.7