List of utility methods to do ByteBuffer Create
ByteBuffer | newByteBuffer(int nbElements) Allocate a new direct buffer ByteBuffer buffer = ByteBuffer.allocateDirect(nbElements);
buffer.order(ByteOrder.nativeOrder());
return buffer;
|
ByteBuffer | newByteBuffer(int theSize) new Byte Buffer return ByteBuffer.allocate(theSize);
|
ByteBuffer | newDirectByteBuffer(int size) new Direct Byte Buffer return ByteBuffer.allocateDirect(size).order(ByteOrder.nativeOrder());
|