moveTo

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

Moves bytes from this buffer to the destination buffer

Parameters

destination - is the buffer to copy bytes to

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

Return number of bytes moved