copyData

fun copyData(from: ByteBuffer, to: ByteBuffer, desiredAmount: Int)

Copy data from one buffer to another

Starts at the current position of each buffer, copies until either buffer is at its limit or the desired amount is reached.

Parameters

from

source buffer to copy from

to

target buffer to copy to

desiredAmount

maximum amount to copy


fun copyData(from: ByteBuffer, desiredAmount: Int): ByteBuffer

Copy data from a buffer

Starts at the current position of the buffer, copies until either the buffer is at its limit or the desired amount is reached.

Return

buffer of the copied data

Parameters

from

source buffer to copy from

desiredAmount

maximum amount to copy