Here you can find the source of createFloatBuffer(int size)
public static FloatBuffer createFloatBuffer(int size)
//package com.java2s; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.FloatBuffer; public class Main { public static FloatBuffer createFloatBuffer(int size) { ByteBuffer bb = ByteBuffer.allocateDirect(size * 4); bb.order(ByteOrder.nativeOrder()); return bb.asFloatBuffer(); }// w w w . j a va 2 s . c om }