an extension of the nio buffer
This is a small library based on Nio. It allows you to take a buffer from a survey, the condition is that the buffer must be free. The good thing is that the buffers are reused, so you save more memory.
Buffer buffer = ByteBuf.heap();Buffer buffer = ByteBuf.direct();//poll a buffer
buffer.writeInt(2022);
//fetch readable bytes to array
System.out.println(Arrays.toString(buffer.array()));
//disconnect buffer instance
buffer.detach();