Here you can find the source of newFloatBuffer(int numFloats)
public static FloatBuffer newFloatBuffer(int numFloats)
//package com.java2s; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.FloatBuffer; public class Main { public static FloatBuffer newFloatBuffer(int numFloats) { ByteBuffer buffer = ByteBuffer.allocateDirect(numFloats * 4); buffer.order(ByteOrder.nativeOrder()); return buffer.asFloatBuffer(); }// w w w. j a v a2 s . c o m }