public Bits read ( final int bits ) throws IOException { final int additionalBitsNeeded = bits - this . remainder . bitLength ; final int additionalBytesNeeded = ( int ) Math . ceil ( additionalBitsNeeded / 8. ) ; if ( additionalBytesNeeded > 0 ) this . readAhead ( additionalBytesNeeded ) ; final Bits readBits = this . remainder . range ( 0 , bits ) ; this . remainder = this . remainder . range ( bits ) ; return readBits ; }
Read bits .