IoBuffer buf = IoBuffer.allocate(4);
buf.putInt(0xdeadbeef);
buf.clear();
assertEquals(0xdeadbeef, buf.getInt());
assertEquals(4, buf.position());
assertEquals(4, buf.limit());
buf.sweep((byte) 0x45);
assertEquals(0, buf.position());
assertEquals(4, buf.limit());
assertEquals(0x45454545, buf.getInt());