org.mapdb.volume / Volume / copyTo


open fun copyTo(inputOffset: Long, target: Volume, targetOffset: Long, size: Long): Unit

Transfers data from this Volume into target volume. If its possible, the implementation should override this method to enable direct memory transfer. Caller must respect slice boundaries. ie it is not possible to transfer data which cross slice boundaries.


inputOffset - offset inside this Volume, ie data will be read from this offset

target - Volume to copy data into

targetOffset - position in target volume where data will be copied into

size - size of data to copy

open fun copyTo(to: Volume): Unit

Copy content of this volume to another. Target volume might grow, but is never shrank. Target is also not synced

open fun copyTo(output: OutputStream): Unit

Copy content of this volume to OutputStream.