readAtMostTo
Removes up to the specified kapacity of bytes from this buffer and appends them to the sink.
Return
A Kapacity representing the exact number of bytes that were successfully read and transferred.
Parameters
The destination buffer to write the bytes into.
The maximum amount of data to read.
Removes up to the specified kapacity of bytes from this buffer and writes them into the provided sink array.
Warning on Bounds: Because primitive arrays are strictly indexed by Int, reading operations are safely bounded to Int.MAX_VALUE- 8 (approximately 2.14 GB). The target end index is safely clamped to prevent IndexOutOfBoundsException if the calculated boundary exceeds the array's physical size.
Return
A Kapacity representing the exact number of bytes that were successfully read into the array.
Parameters
The destination primitive array.
The index in the sink array to begin writing the data. Defaults to 0.
The maximum amount of data to read from this buffer.