public void initializeEmpty(int length) {
        if (data != null) {
            BufferUtils.destroyDirectBuffer(data);
        }
        this.data = BufferUtils.createByteBuffer(length);
    }
Initialize an empty buffer object of the given length

@param length expected length of the buffer object
jme3-core/src/main/java/com/jme3/shader/bufferobject/BufferObject.java