List of utility methods to do IntBuffer Create
IntBuffer | createIntBuffer(final int... data) Generate a new IntBuffer using the given array of ints. if (data == null) { return null; final IntBuffer buff = createIntBuffer(data.length); buff.clear(); buff.put(data); buff.flip(); return buff; ... |
IntBuffer | createIntBuffer(final int... data) create Int Buffer if (data == null) { return null; final IntBuffer buff = createIntBuffer(data.length); buff.clear(); buff.put(data); buff.flip(); return buff; ... |
IntBuffer | createIntBuffer(int capacity) create Int Buffer return createByteBuffer(capacity * Integer.BYTES).asIntBuffer();
|
IntBuffer | createIntBuffer(int size) Constructs a direct native-order intbuffer with the specified number of elements. return (createByteBuffer(size << 2).asIntBuffer());
|
IntBuffer | createIntBuffer(int size) Construct a direct native-order intbuffer with the specified number of elements. return createByteBuffer(size << 2).asIntBuffer();
|
IntBuffer | createIntBuffer(int size) create Int Buffer return createByteBuffer(size * Integer.BYTES).asIntBuffer();
|
IntBuffer | createIntBuffer(int... data) Generate a new IntBuffer using the given array of ints. if (data == null) return null; IntBuffer buff = createIntBuffer(data.length); buff.clear(); buff.put(data); buff.flip(); return buff; |
IntBuffer | createIntBuffer(int[] array) create Int Buffer IntBuffer result = ByteBuffer.allocateDirect(array.length << 2).order(ByteOrder.nativeOrder())
.asIntBuffer();
result.put(array).flip();
return result;
|
IntBuffer | createIntBufferOnHeap(final int size) Create a new IntBuffer of the specified size. final IntBuffer buf = ByteBuffer.allocate(4 * size).order(ByteOrder.nativeOrder()).asIntBuffer(); buf.clear(); return buf; |
IntBuffer | newDirectIntBuffer(final int theSize) new Direct Int Buffer ByteBuffer myBuffer = ByteBuffer.allocateDirect(theSize * SIZE_OF_INT);
myBuffer.order(ByteOrder.nativeOrder());
return myBuffer.asIntBuffer();
|