VorbisBitArray { public void skipBits(int numBits) { int numBytes = numBits / 8; byteOffset += numBytes; bitOffset += numBits - (numBytes * 8); if (bitOffset > 7) { byteOffset++; bitOffset -= 8; } assertValidOffset(); } VorbisBitArray(byte[] data); void reset(); boolean readBit(); int readBits(int numBits); void skipBits(int numBits); int getPosition(); void setPosition(int position); int bitsLeft();  }
@Test public void testSkipBits() { VorbisBitArray bitArray = new VorbisBitArray(TestUtil.createByteArray(0xF0, 0x0F)); bitArray.skipBits(10); assertThat(bitArray.getPosition()).isEqualTo(10); assertThat(bitArray.readBit()).isTrue(); assertThat(bitArray.readBit()).isTrue(); assertThat(bitArray.readBit()).isFalse(); bitArray.skipBits(1); assertThat(bitArray.getPosition()).isEqualTo(14); assertThat(bitArray.readBit()).isFalse(); assertThat(bitArray.readBit()).isFalse(); }