List of usage examples for io.netty.buffer ByteBuf clear
public abstract ByteBuf clear();
From source file:z.offheap.buffer.contrast.ContrastTestNettyByteBuf.java
License:Open Source License
private long doWithNettyByteBuf(ByteBuf bn, int i) { bn.clear().writeByte(i).writeByte(i).writeShort(i).writeInt(i).writeLong(i); long rnb1 = bn.readLong(); long rnb2 = bn.readLong(); return rnb1 + rnb2; }