ByteBufferPool pool = new ByteBufferPool(10, 3); ByteBufferListOutputStream bbos = new ByteBufferListOutputStream(pool); bbos.write(2);// Write a byte bbos.writeInt(100);// Write an int byte[] b = Bytes.toBytes("row123");// 6 bytes bbos.write(b); bbos.write(bb, 0, bb.capacity()); pool.putbackBuffer(bb1); bbos.writeInt(123);
ByteBufferPool pool = new ByteBufferPool(10, 3); ByteBufferListOutputStream bbos = new ByteBufferListOutputStream(pool); bbos.write(2);// Write a byte bbos.writeInt(100);// Write an int byte[] b = Bytes.toBytes("row123");// 6 bytes bbos.write(b); bbos.write(bb, 0, bb.capacity()); pool.putbackBuffer(bb1); bbos.writeInt(123);
ByteBufferPool pool = new ByteBufferPool(10, 3); ByteBufferListOutputStream bbos = new ByteBufferListOutputStream(pool); bbos.write(2);// Write a byte bbos.writeInt(100);// Write an int byte[] b = Bytes.toBytes("row123");// 6 bytes bbos.write(b); bbos.write(bb, 0, bb.capacity()); pool.putbackBuffer(bb1); bbos.writeInt(123);