Java FloatBuffer Create newFloatBuffer(int len)

Here you can find the source of newFloatBuffer(int len)

Description

new Float Buffer

License

Mozilla Public License

Declaration

public static FloatBuffer newFloatBuffer(int len) 

Method Source Code

//package com.java2s;
//License from project: Mozilla Public License 

import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.FloatBuffer;

public class Main {
    public static FloatBuffer newFloatBuffer(int len) {
        return newByteBuffer(4 * len).asFloatBuffer();
    }//from  w  w w.  j  a  v a2s .  com

    public static ByteBuffer newByteBuffer(int len) {
        return ByteBuffer.allocateDirect(len).order(ByteOrder.nativeOrder());
    }
}

Related

  1. createFloatBuffer(int limit)
  2. createFloatBuffer(int numFloats)
  3. createFloatBuffer(int size)
  4. createFloatBufferOnHeap(final int size)
  5. newFloatBuffer(final int theSize)
  6. newFloatBuffer(int numFloats)
  7. newNativeFloatBuffer(int size)
  8. toFloatBuffer(float[] array)