public void setData(ByteBuffer data) {
        if (data != null) {
            BufferUtils.destroyDirectBuffer(data);
        }
        this.data = BufferUtils.createByteBuffer(data.limit() - data.position());
        this.data.put(data);
    }
Transfer remaining bytes of passed buffer to the internal buffer of this buffer object

@param data ByteBuffer containing the data to pass
jme3-core/src/main/java/com/jme3/shader/bufferobject/BufferObject.java