VorbisReader extends StreamReader { @VisibleForTesting static int readBits(byte src, int length, int leastSignificantBitIndex) { return (src >> leastSignificantBitIndex) & (255 >>> (8 - length)); }  static boolean verifyBitstreamType(ParsableByteArray data);  }
@Test public void testReadBits() throws Exception { assertThat(readBits((byte) 0x00, 2, 2)).isEqualTo(0); assertThat(readBits((byte) 0x02, 1, 1)).isEqualTo(1); assertThat(readBits((byte) 0xF0, 4, 4)).isEqualTo(15); assertThat(readBits((byte) 0x80, 1, 7)).isEqualTo(1); }