larray
larray copied to clipboard
Copying one MappedLByteArray into another MappedLByteArray
It doesn't appear as though there's a straightforward way of copying the contents of a buffer produced by LArray.mmap into another buffer produced by LArray.mmap. LArray.mmap returns a MappedLByteArray whereas its copyTo method requires the target to be an LByteArray.
Any advice? Thanks.
For reference: my work-around is this:
UnsafeUtil.unsafe.copyMemory(
sourceBuffer.address,
targetBuffer.address + targetOffset,
sourceBuffer.length
)