Here you can find the source of newFloatBuffer(int len)
public static FloatBuffer newFloatBuffer(int len)
//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()); } }