writeToOutputStream

suspend fun ByteStream.writeToOutputStream(outputStream: OutputStream): Long

Writes this stream to the given OutputStream, then closes it.

Parameters

outputStream

The OutputStream to which the contents of this stream will be written