10201021102210231024102510261027102810291030
stream.writeBit(1); stream.readBit(); for (int i = 0; i < sampleBytes().length; i++) { assertEquals(sampleBytes()[i] & 0xff, stream.readUnsignedByte()); } assertEquals(1, stream.getData().readable()); } finally { }
10321033103410351036103710381039104010411042
@Test public void fReadUnsignedByte_void() throws Exception { try { Stream stream = new Stream(); stream.readUnsignedByte(); fail(); } catch (EOFException ex) { } try {
10401041104210431044104510461047104810491050
} try { Stream stream = new Stream(); stream.writeBit(1); stream.readUnsignedByte(); fail(); } catch (InsufficientBufferException ex) { } }