| StreamConvertersFromOutputStream Method |
Creates a Sink which writes incoming
ByteStrings to an
Stream created by the given function.
Materializes a
TaskTResult of
IOResult that will be completed with the size of the file (in bytes) at the streams completion,
and a possible exception if IO operation was not completed successfully.
You can configure the default dispatcher for this Source by changing the "akka.stream.blocking-io-dispatcher" or
set it for a given Source by using
CreateDispatcher(String).
If
autoFlush is true the OutputStream will be flushed whenever a byte array is written, defaults to false.
The
Stream will be closed when the stream flowing into this
SinkTIn, TMat is completed. The
SinkTIn, TMat
will cancel the stream when the
Stream is no longer writable.
Namespace:
Akka.Streams.Dsl
Assembly:
Akka.Streams (in Akka.Streams.dll) Version: 1.2.3.42 (1.2.3.42)
Syntax public static Sink<ByteString, Task<IOResult>> FromOutputStream(
Func<Stream> createOutputStream,
bool autoFlush = false
)
static member FromOutputStream :
createOutputStream : Func<Stream> *
?autoFlush : bool
(* Defaults:
let _autoFlush = defaultArg autoFlush false
*)
-> Sink<ByteString, Task<IOResult>>
Parameters
- createOutputStream
- Type: SystemFuncStream
A function which creates the Stream to write to - autoFlush (Optional)
- Type: SystemBoolean
If set to true the Stream will be flushed whenever a byte array is written, default is false
Return Value
Type:
SinkByteString,
TaskIOResultTBD
See Also