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

        DoubleBuffer copy;
        if (isDirect(buf)) {
            copy = createDoubleBuffer(buf.limit());
        } else {
            copy = DoubleBuffer.allocate(buf.limit());
        }
        copy.put(buf);

        return copy;
    }
Creates a new DoubleBuffer with the same contents as the given
DoubleBuffer. The new DoubleBuffer 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 DoubleBuffer to copy
@return the copy
jme3-core/src/main/java/com/jme3/util/BufferUtils.java