378379380381382383384385386387388
outBuffer.readerIndex(0); for (int i = 0; i < 10240 * 10; i++) { assertEquals("position " + i, getSamplebyte(i), outBuffer.readByte()); } } finally { outBuffer.close();
370371372373374375376377378379380
outBuffer.readerIndex(0); for (int i = 0; i < 10240 * 10; i++) { assertEquals("position " + i, getSamplebyte(i), outBuffer.readByte()); } outBuffer.readerIndex(0); for (int i = 0; i < 10240 * 10; i++)
377378379380381382383384385386387
611612613614615616617618619620621
latchBytesWritten1.await(); try { outBuffer.readByte(); Assert.fail("supposed to throw an exception"); } catch (IllegalAccessError ignored) { }
8990919293949596979899
for (int i = 1; i <= 15; i++) { try { Assert.assertEquals(i, buffer.readByte()); } catch (Exception e) { throw new Exception("Exception at position " + i, e); }
99100101102103104105106107108109
} } try { buffer.readByte(); Assert.fail("supposed to throw an exception"); } catch (IndexOutOfBoundsException e) { }
159160161162163164165166167168169
Assert.assertEquals(i, buffer.readInt()); } try { buffer.readByte(); Assert.fail("supposed to throw an exception"); } catch (IndexOutOfBoundsException e) { }
193194195196197198199200201202203
Assert.assertEquals(i, buffer.readLong()); } try { buffer.readByte(); Assert.fail("supposed to throw an exception"); } catch (IndexOutOfBoundsException e) { }