Here you can find the source of createFloatBuffer(int floatCount)
public static FloatBuffer createFloatBuffer(int floatCount)
//package com.java2s; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.FloatBuffer; public class Main { public static FloatBuffer createFloatBuffer(int floatCount) { ByteBuffer data = ByteBuffer.allocateDirect(floatCount * 4); data.order(ByteOrder.nativeOrder()); FloatBuffer p1 = data.asFloatBuffer(); return p1; }//from w w w . jav a 2 s . c o m }