StreamConverters.asOutputStream

Create a source that materializes into an OutputStream.

Additional Sink and Source converters

Signature

def asOutputStream(writeTimeout: FiniteDuration = 5.seconds): Source[ByteString, OutputStream]

Description

Create a source that materializes into an OutputStream. When bytes are written to the OutputStream they are emitted from the source.

The OutputStream will no longer be writable when the Source has been canceled from its downstream, and closing the OutputStream will complete the Source.

emits when bytes are written to the OutputStream

completes when the OutputStream is closed

Found an error in this documentation? The source code for this page can be found here. Please feel free to edit and contribute a pull request.