Java Utililty Methods ByteBuffer Create

List of utility methods to do ByteBuffer Create

Description

The list of methods to do ByteBuffer Create are organized into topic(s).

Method

ByteBuffernewByteBuffer(int nbElements)
Allocate a new direct buffer
ByteBuffer buffer = ByteBuffer.allocateDirect(nbElements);
buffer.order(ByteOrder.nativeOrder());
return buffer;
ByteBuffernewByteBuffer(int theSize)
new Byte Buffer
return ByteBuffer.allocate(theSize);
ByteBuffernewDirectByteBuffer(int size)
new Direct Byte Buffer
return ByteBuffer.allocateDirect(size).order(ByteOrder.nativeOrder());