DataRef

open fun DataRef(@NonNull buffer: ByteBuffer)

Create a wrapper for the DirectByteBuffer so that native code can access the underlying memory region allocated by the DirectByteBuffer.

Parameters

buffer

instance of java.nio.DirectByteBuffer (created by ByteBuffer#allocateDirect() or JNI#NewDirectByteBuffer()). Do not pass ByteBuffer instance created from other method (ByteBuffer#allocate() and ByteBuffer.wrap(byte[]))