Creates a Source from a files contents.
Creates a Source from a files contents.
Emitted elements are chunkSize
sized akka.util.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 ActorAttributes.
It materializes a Future 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 file path to read from
the size of each read operation, defaults to 8192
the start position to read from
Creates a Source from a files contents.
Creates a Source from a files contents.
Emitted elements are chunkSize
sized akka.util.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 akka.stream.ActorAttributes.
It materializes a Future 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 file path to read from
the size of each read operation, defaults to 8192
Creates a Sink which writes incoming ByteString elements to the given file path.
Creates a Sink which writes incoming ByteString elements to the given file path. Overwrites existing files by truncating their contents as default.
Materializes a Future 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.
This source is backed by an Actor which will use the dedicated akka.stream.blocking-io-dispatcher
,
unless configured otherwise by using ActorAttributes.
the file path to write to
File open options, see java.nio.file.StandardOpenOption, defaults to Set(WRITE, CREATE)
the start position to write to
Creates a Sink which writes incoming ByteString elements to the given file path.
Creates a Sink which writes incoming ByteString elements to the given file path. Overwrites existing files by truncating their contents as default.
Materializes a Future 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.
This source is backed by an Actor which will use the dedicated akka.stream.blocking-io-dispatcher
,
unless configured otherwise by using akka.stream.ActorAttributes.
the file path to write to
File open options, see java.nio.file.StandardOpenOption, defaults to Set(WRITE, TRUNCATE_EXISTING, CREATE)
(Since version ) see corresponding Javadoc for more information.
Creates a Source from a files contents.
Creates a Source from a files contents.
Emitted elements are chunkSize
sized akka.util.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 akka.stream.ActorAttributes.
It materializes a Future 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 file to read from
the size of each read operation, defaults to 8192
(Since version 2.4.5) Use fromPath
instead
Creates a Sink which writes incoming ByteString elements to the given file.
Creates a Sink which writes incoming ByteString elements to the given file. Overwrites existing files by truncating their contents as default.
Materializes a Future 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.
This source is backed by an Actor which will use the dedicated akka.stream.blocking-io-dispatcher
,
unless configured otherwise by using akka.stream.ActorAttributes.
the file to write to
File open options, see java.nio.file.StandardOpenOption, defaults to Set(WRITE, TRUNCATE_EXISTING, CREATE)
(Since version 2.4.5) Use toPath
instead
Java API: Factories to create sinks and sources from files