Object

akka.stream.javadsl

FileIO

Related Doc: package javadsl

Permalink

object FileIO

Factories to create sinks and sources from files

Source
FileIO.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. FileIO
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def fromPath(f: Path, chunkSize: Int, startPosition: Long): Source[ByteString, CompletionStage[IOResult]]

    Permalink

    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.

    f

    the file path to read from

    chunkSize

    the size of each read operation

    startPosition

    startPosition the start position to read from, defaults to 0

  9. def fromPath(f: Path, chunkSize: Int): Source[ByteString, CompletionStage[IOResult]]

    Permalink

    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.

    f

    the file path to read from

    chunkSize

    the size of each read operation

  10. def fromPath(f: Path): Source[ByteString, CompletionStage[IOResult]]

    Permalink

    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.

    f

    the file path to read from

  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  12. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  16. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  17. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  18. def toPath[Opt <: OpenOption](f: Path, options: Set[Opt], startPosition: Long): Sink[ByteString, CompletionStage[IOResult]]

    Permalink

    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.

    f

    The file path to write to

    options

    File open options, see java.nio.file.StandardOpenOption

    startPosition

    startPosition the start position to read from, defaults to 0

  19. def toPath[Opt <: OpenOption](f: Path, options: Set[Opt]): Sink[ByteString, CompletionStage[IOResult]]

    Permalink

    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.

    f

    The file path to write to

    options

    File open options, see java.nio.file.StandardOpenOption

  20. def toPath(f: Path): Sink[ByteString, CompletionStage[IOResult]]

    Permalink

    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.

    f

    The file path to write to

  21. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  22. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

  2. def fromFile(f: File, chunkSize: Int): Source[ByteString, CompletionStage[IOResult]]

    Permalink

    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.

    f

    the file to read from

    chunkSize

    the size of each read operation

    Annotations
    @deprecated
    Deprecated

    (Since version 2.4.5) Use fromPath instead.

  3. def fromFile(f: File): Source[ByteString, CompletionStage[IOResult]]

    Permalink

    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.

    f

    the file to read from

    Annotations
    @deprecated
    Deprecated

    (Since version 2.4.5) Use fromPath instead.

  4. def toFile[Opt <: OpenOption](f: File, options: Set[Opt]): Sink[ByteString, CompletionStage[IOResult]]

    Permalink

    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.

    f

    The file to write to

    options

    File open options, see java.nio.file.StandardOpenOption

    Annotations
    @deprecated
    Deprecated

    (Since version 2.4.5) Use toPath instead.

  5. def toFile(f: File): Sink[ByteString, CompletionStage[IOResult]]

    Permalink

    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.

    f

    The file to write to

    Annotations
    @deprecated
    Deprecated

    (Since version 2.4.5) Use toPath instead.

Inherited from AnyRef

Inherited from Any

Ungrouped