object FileIO
- Alphabetic
- By Inheritance
- FileIO
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
fromPath(f: Path, chunkSize: Int, startPosition: Long): Source[ByteString, Future[IOResult]]
Creates a Source from a files contents.
Creates a Source from a files contents. Emitted elements are
chunkSizesized akka.util.ByteString elements, except the final element, which will be up tochunkSizein size.You can configure the default dispatcher for this Source by changing the
akka.stream.blocking-io-dispatcheror 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.
- f
the file path to read from
- chunkSize
the size of each read operation, defaults to 8192
- startPosition
the start position to read from
-
def
fromPath(f: Path, chunkSize: Int = 8192): Source[ByteString, Future[IOResult]]
Creates a Source from a files contents.
Creates a Source from a files contents. Emitted elements are
chunkSizesized akka.util.ByteString elements, except the final element, which will be up tochunkSizein size.You can configure the default dispatcher for this Source by changing the
akka.stream.blocking-io-dispatcheror 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.
- f
the file path to read from
- chunkSize
the size of each read operation, defaults to 8192
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toPath(f: Path, options: Set[OpenOption], startPosition: Long): Sink[ByteString, Future[IOResult]]
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.- f
the file path to write to
- options
File open options, see java.nio.file.StandardOpenOption, defaults to Set(WRITE, CREATE)
- startPosition
the start position to write to
-
def
toPath(f: Path, options: Set[OpenOption] = ...): Sink[ByteString, Future[IOResult]]
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.- f
the file path to write to
- options
File open options, see java.nio.file.StandardOpenOption, defaults to Set(WRITE, TRUNCATE_EXISTING, CREATE)
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
fromFile(f: File, chunkSize: Int = 8192): Source[ByteString, Future[IOResult]]
Creates a Source from a files contents.
Creates a Source from a files contents. Emitted elements are
chunkSizesized akka.util.ByteString elements, except the final element, which will be up tochunkSizein size.You can configure the default dispatcher for this Source by changing the
akka.stream.blocking-io-dispatcheror 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.
- f
the file to read from
- chunkSize
the size of each read operation, defaults to 8192
- Annotations
- @deprecated
- Deprecated
(Since version 2.4.5) Use
fromPathinstead
-
def
toFile(f: File, options: Set[OpenOption] = ...): Sink[ByteString, Future[IOResult]]
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.- f
the file to write to
- options
File open options, see java.nio.file.StandardOpenOption, defaults to Set(WRITE, TRUNCATE_EXISTING, CREATE)
- Annotations
- @deprecated
- Deprecated
(Since version 2.4.5) Use
toPathinstead