t left one bit to make room accum |= readBit(); } } Note that the result of
readBits(32) may thus not be equal to that of
readInt() if a reverse network byte order is being used (i.e.,
getByteOrder() == false).
If the end of the stream is encountered before all the bits have been read, an java.io.EOFException is thrown.
@param numBits the number of bits to read, as an intbetween 0 and 64, inclusive.
@return the bitstring, as a long with the last bitread stored in the least significant bit.
@exception IllegalArgumentException if numBitsis not between 0 and 64, inclusive.
@exception java.io.EOFException if the stream reaches the end beforereading all the bits.
@exception IOException if an I/O error occurs.