Companion

object Companion

Functions

Link copied to clipboard

Returns a new empty dataref (or a reference to a shared empty dataref). New or shared, the caller must see that .close is eventually called.

Link copied to clipboard
fun makeFromBytes(bytes: ByteArray, offset: Int = 0, length: Int = bytes.size): Data
makeFromFileName
Link copied to clipboard

Create a new dataref the file with the specified path. If the file cannot be opened, this returns null.

Create a new dataref the file with the specified path. If the file cannot be opened, this returns null.

Link copied to clipboard
fun makeUninitialized(length: Int): Data
Link copied to clipboard
fun makeWithoutCopy(memoryAddr: NativePointer, length: Int, underlyingMemoryOwner: Managed): Data

makeWithoutCopy uses NoopReleaseProc as a ReleaseProc, therefore memory needs to be cleaned up by caller side (or by underlyingMemoryOwner if provided).