write

abstract suspend fun write(source: SdkBuffer, byteCount: Long = source.size)

Removes exactly byteCount bytes from source and appends them to this. Suspends until all bytes have been written. It is not safe to modify source until this function returns Throws ClosedWriteChannelException if this channel was already closed.

Parameters

source

the buffer data will be read from and written to this channel

byteCount

the number of bytes to read from source