Here you can find the source of newNativeFloatBuffer(int size)
public static FloatBuffer newNativeFloatBuffer(int size)
//package com.java2s; //License from project: BSD License import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.FloatBuffer; public class Main { public static FloatBuffer newNativeFloatBuffer(int size) { FloatBuffer buff = ByteBuffer.allocateDirect(size * Float.SIZE).order(ByteOrder.nativeOrder()) .asFloatBuffer();//from w ww . j ava2s .c o m return buff; } }