public static int[] getIntArray(IntBuffer buff) {
        if (buff == null) {
            return null;
        }
        buff.clear();
        int[] inds = new int[buff.limit()];
        for (int x = 0; x < inds.length; x++) {
            inds[x] = buff.get();
        }
        return inds;
    }
Create a new int[] array and populate it with the given IntBuffer's
contents.

@param buff
           the IntBuffer to read from
@return a new int array populated from the IntBuffer
jme3-core/src/main/java/com/jme3/util/BufferUtils.java