readBuffer
Reads the entire channel to an in-memory Buffer. This function suspends until data becomes available or the channel is closed.
Return
the entire contents of the ByteReadChannel
Reads data from the current ByteReadChannel into a new Buffer up to the specified maximum number of bytes. This function suspends until data becomes available or the channel is closed.
Return
A Buffer containing the data read from the channel.
Parameters
The maximum number of bytes to read from the channel.
Deprecated
Use Long parameter
Replace with
readBuffer(max.toLong())Reads data from the current ByteReadChannel into a new Buffer up to the specified maximum number of bytes. This function suspends until data becomes available or the channel is closed.
Return
A Buffer containing the data read from the channel.
Parameters
The maximum number of bytes to read from the channel.