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 bf = ByteBuffer.allocateDirect(size * 4); return bf.order(ByteOrder.nativeOrder()).asFloatBuffer(); }//from www . j ava2 s . c o m }