Here you can find the source of getFloatArray(FloatBuffer buff)
Parameter | Description |
---|---|
buff | the FloatBuffer to read from |
public static float[] getFloatArray(FloatBuffer buff)
//package com.java2s; import java.nio.FloatBuffer; public class Main { /**/*from www . ja v a 2 s . co m*/ * Create a new float[] array and populate it with the given FloatBuffer's * contents. * * @param buff the FloatBuffer to read from * @return a new float array populated from the FloatBuffer */ public static float[] getFloatArray(FloatBuffer buff) { if (buff == null) { return null; } buff.clear(); float[] inds = new float[buff.limit()]; for (int x = 0; x < inds.length; x++) { inds[x] = buff.get(); } return inds; } }