List of utility methods to do FloatBuffer Create
FloatBuffer | createFloatBuffer(float[] array) create Float Buffer FloatBuffer result = genFloatBuffer(array.length << 2);
result.put(array).flip();
return result;
|
FloatBuffer | createFloatBuffer(FloatBuffer buffer) create Float Buffer FloatBuffer dest = createFloatBuffer(buffer.capacity());
dest.clear();
dest.put(buffer);
dest.position(0);
return dest;
|
FloatBuffer | createFloatBuffer(int limit) create Float Buffer FloatBuffer buf = ByteBuffer.allocateDirect(4 * limit).order(ByteOrder.nativeOrder()).asFloatBuffer();
buf.clear();
return buf;
|
FloatBuffer | createFloatBuffer(int numFloats) Return a FloatBuffer which can hold the specified number of floats. return ByteBuffer.allocateDirect(numFloats * Float.BYTES).order(ByteOrder.nativeOrder()).asFloatBuffer();
|
FloatBuffer | createFloatBuffer(int size) create Float Buffer return createByteBuffer(size << 2).asFloatBuffer();
|
FloatBuffer | createFloatBufferOnHeap(final int size) create Float Buffer On Heap final FloatBuffer buf = ByteBuffer.allocate(4 * size).order(ByteOrder.nativeOrder()).asFloatBuffer(); buf.clear(); return buf; |
FloatBuffer | newFloatBuffer(final int theSize) Creates a FloatBuffer of the given size return FloatBuffer.allocate(theSize);
|
FloatBuffer | newFloatBuffer(int len) new Float Buffer return newByteBuffer(4 * len).asFloatBuffer();
|
FloatBuffer | newFloatBuffer(int numFloats) new Float Buffer ByteBuffer buffer = ByteBuffer.allocateDirect(numFloats * 4);
buffer.order(ByteOrder.nativeOrder());
return buffer.asFloatBuffer();
|
FloatBuffer | newNativeFloatBuffer(int size) new Native Float Buffer FloatBuffer buff = ByteBuffer.allocateDirect(size * Float.SIZE).order(ByteOrder.nativeOrder())
.asFloatBuffer();
return buff;
|