Java Utililty Methods FloatBuffer Create

List of utility methods to do FloatBuffer Create

Description

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

Method

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