boolean hasReadableBits ( int count ) { if ( count < 0 ) { throw new IllegalArgumentException ( "count: " + count + " (expected value greater than 0)" ) ; } return bitCount >= count || ( in . readableBytes ( ) << 3 & Integer . MAX_VALUE ) >= count - bitCount ; }
Checks that the specified number of bits available for reading .