public static DoubleBuffer createDoubleBuffer(int size) {
        DoubleBuffer buf = allocator.allocate(8 * size).order(ByteOrder.nativeOrder()).asDoubleBuffer();
        buf.clear();
        onBufferAllocated(buf);
        return buf;
    }
Create a new DoubleBuffer of the specified size.

@param size
           required number of double to store.
@return the new DoubleBuffer
jme3-core/src/main/java/com/jme3/util/BufferUtils.java