StreamConverters Methods |
The StreamConverters type exposes the following members.
Name | Description | |
---|---|---|
AsInputStream |
Creates a Sink which when materialized will return an Stream which it is possible
to read the values produced by the stream this Sink is attached to.
This Sink is intended for inter-operation with legacy APIs since it is inherently blocking.
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).
The Stream will be closed when the stream flowing into this SinkTIn, TMat completes, and
closing the Stream will cancel this SinkTIn, TMat.
| |
AsOutputStream |
Creates a SourceTOut, TMat which when materialized will return an Stream which it is possible
to write the ByteStrings to the stream this Source is attached to.
This Source is intended for inter-operation with legacy APIs since it is inherently blocking.
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).
The created Stream will be closed when the SourceTOut, TMat is cancelled, and closing the Stream
will complete this SourceTOut, TMat.
| |
FromInputStream |
Creates a SourceTOut, TMat from an Stream created by the given function.
Emitted elements are chunkSize sized ByteString elements,
except the final element, which will be up to chunkSize in size.
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).
It materializes a TaskTResult of IOResult containing the number of bytes read from the source file upon completion,
and a possible exception if IO operation was not completed successfully.
The created Stream will be closed when the SourceTOut, TMat is cancelled.
| |
FromOutputStream |
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.
|