use of com.amazon.ion.IonException in project ion-java by amzn.
the class ByteBufferTest method testSmallInsertion.
@Test
public void testSmallInsertion() {
BufferManager buf = new BufferManager();
IonBinary.Writer writer = buf.openWriter();
// Write enough data to overflow the first block
byte[] initialData = new byte[BlockedBuffer._defaultBlockSizeMin + 5];
// Now insert some stuff at the beginning
try {
writer.write(initialData, 0, initialData.length);
writer.setPosition(0);
writer.insert(10);
} catch (IOException e) {
throw new IonException(e);
}
}
Aggregations