moveTo

fun ByteBuffer.moveTo(destination: ByteBuffer, limit: Int = Int.MAX_VALUE): Int

Moves bytes from this buffer to the destination buffer

Return

number of bytes moved

Parameters

destination

is the buffer to copy bytes to

limit

is an optional parameter specifying maximum number of bytes to be moved