public static FloatBuffer clone(FloatBuffer buf) {
        if (buf == null) {
            return null;
        }
        buf.rewind();

        FloatBuffer copy;
        if (isDirect(buf)) {
            copy = createFloatBuffer(buf.limit());
        } else {
            copy = FloatBuffer.allocate(buf.limit());
        }
        copy.put(buf);

        return copy;
    }
Creates a new FloatBuffer with the same contents as the given
FloatBuffer. The new FloatBuffer is separate from the old one and changes
are not reflected across. If you want to reflect changes, consider using
Buffer.duplicate().

@param buf
           the FloatBuffer to copy
@return the copy
jme3-core/src/main/java/com/jme3/util/BufferUtils.java