Creates a synchronous Source from a files contents.
Creates a synchronous Source from a files contents.
Emitted elements are chunkSize
sized ByteString elements,
except the last 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 java.util.concurrent.CompletionStage 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
startPosition the start position to read from, defaults to 0
Creates a synchronous Source from a files contents.
Creates a synchronous Source from a files contents.
Emitted elements are chunkSize
sized ByteString elements,
except the last 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 java.util.concurrent.CompletionStage 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
Creates a Source from a files contents.
Creates a Source from a files contents. Emitted elements are ByteString elements, chunked by default by 8192 bytes, except the last element, which will be up to 8192 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 java.util.concurrent.CompletionStage 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
Creates a Sink that writes incoming ByteString elements to the given file path.
Creates a Sink that writes incoming ByteString elements to the given file path.
Materializes a java.util.concurrent.CompletionStage 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 ActorAttributes.
The file path to write to
File open options, see java.nio.file.StandardOpenOption
startPosition the start position to read from, defaults to 0
Creates a Sink that writes incoming ByteString elements to the given file path.
Creates a Sink that writes incoming ByteString elements to the given file path.
Materializes a java.util.concurrent.CompletionStage 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 ActorAttributes.
The file path to write to
File open options, see java.nio.file.StandardOpenOption
Creates a Sink that writes incoming ByteString elements to the given file path.
Creates a Sink that writes incoming ByteString elements to the given file path. Overwrites existing files by truncating their contents, if you want to append to an existing file util.Set[OpenOption]) with java.nio.file.StandardOpenOption.APPEND.
Materializes a java.util.concurrent.CompletionStage 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 ActorAttributes.
The file path to write to
(Since version ) see corresponding Javadoc for more information.
Creates a synchronous Source from a files contents.
Creates a synchronous Source from a files contents.
Emitted elements are chunkSize
sized ByteString elements,
except the last 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 java.util.concurrent.CompletionStage 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
(Since version 2.4.5) Use fromPath
instead.
Creates a Source from a files contents.
Creates a Source from a files contents. Emitted elements are ByteString elements, chunked by default by 8192 bytes, except the last element, which will be up to 8192 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 java.util.concurrent.CompletionStage 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
(Since version 2.4.5) Use fromPath
instead.
Creates a Sink that writes incoming ByteString elements to the given file.
Creates a Sink that writes incoming ByteString elements to the given file.
Materializes a java.util.concurrent.CompletionStage 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 ActorAttributes.
The file to write to
File open options, see java.nio.file.StandardOpenOption
(Since version 2.4.5) Use toPath
instead.
Creates a Sink that writes incoming ByteString elements to the given file.
Creates a Sink that writes incoming ByteString elements to the given file. Overwrites existing files by truncating their contents, if you want to append to an existing file use util.Set[OpenOption]) with java.nio.file.StandardOpenOption.APPEND.
Materializes a java.util.concurrent.CompletionStage 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 ActorAttributes.
The file to write to
(Since version 2.4.5) Use toPath
instead.
Factories to create sinks and sources from files