copy


Description:

public Memory? copy (ssize_t offset, ssize_t size)

Return a copy of size bytes from this starting from offset.

This copy is guaranteed to be writable. size can be set to -1 to return a copy from offset to the end of the memory region.

Parameters:

this

a Memory

offset

offset to copy from

size

size to copy, or -1 to copy to the end of the memory region

Returns:

a new copy of this if the copy succeeded, null otherwise.