flow
Creates a Flow of ByteArrays by reading the content of this AsynchronousFileChannel using the given bufferSize as the chunk size for each emitted ByteArray.
Return
A Flow of ByteArrays representing chunks of content from this channel.
Example usage:
val channel: AsynchronousFileChannel = ...
val byteArrayFlow = channel.flow(1024)
byteArrayFlow.collect { bytes -> ... }
Content copied to clipboard
Parameters
bufferSize
The size of the buffer to read data chunks into. Defaults to 1024.