13181319132013211322132313241325132613271328
try { Stream stream = new Stream(); stream.writeBit(1); for (NumWithInfo nwi : genNumWithInfos(Integer.SIZE)) { stream.writeInt(nwi.getNumber().intValue(), nwi.getBits()); } stream.writeBit(1); stream.readBit();
13861387138813891390139113921393139413951396
12091210121112121213121412151216121712181219
try { Stream stream = new Stream(); stream.writeBit(1); for (NumWithInfo nwi : genNumWithInfos(Integer.SIZE)) { stream.writeInt(nwi.getNumber().intValue()); } stream.writeBit(1); stream.readBit();
12631264126512661267126812691270127112721273
548549550551552553554555556557558
assertEquals(0, stream.available()); stream.writeBit(1); assertEquals(0, stream.available()); stream.write(8); assertEquals(1, stream.available()); stream.writeInt(0, 7); assertEquals(2, stream.available()); } finally { } }
867868869870871872873874875876877
} finally { } try { Stream stream = new Stream(); stream.writeInt(0, 3); stream.readFully(new byte[1], 0, 1); fail(); } catch (InsufficientBufferException ex) { } finally { }