package io
- Source
- io.scala
- Alphabetic
- By Inheritance
- io
- ioplatform
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- class ClosedChannelException extends IOException
- trait Duplex extends Object with Readable with Writable
A facade for Node.js
stream.Duplex
.A facade for Node.js
stream.Duplex
. Extend or cast to/from your own bindings.- Annotations
- @JSType() @native() @nowarnIgnored("cat=unused")
- See also
- type IOException = java.io.IOException
- class InterruptedIOException extends IOException
- trait Readable extends Object with EventEmitter
A facade for Node.js
stream.Readable
.A facade for Node.js
stream.Readable
. Extend or cast to/from your own bindings.- Annotations
- @JSType() @native() @nowarnIgnored("cat=unused")
- See also
- final class StreamDestroyedException extends IOException
- trait Writable extends Object with EventEmitter
A facade for Node.js
stream.Writable
.A facade for Node.js
stream.Writable
. Extend or cast to/from your own bindings.- Annotations
- @JSType() @native() @nowarnIgnored("cat=unused")
- See also
Value Members
- def readInputStream[F[_]](fis: F[InputStream], chunkSize: Int, closeAfterUse: Boolean = true)(implicit F: Sync[F]): Stream[F, Byte]
Reads all bytes from the specified
InputStream
with a buffer size ofchunkSize
.Reads all bytes from the specified
InputStream
with a buffer size ofchunkSize
. SetcloseAfterUse
to false if theInputStream
should not be closed after use. - def readWritable[F[_]](f: (Writable) => F[Unit])(implicit arg0: Async[F]): Stream[F, Byte]
Take a function that emits to a
Writable
effectfully, and return a stream which, when run, will perform that function and emit the bytes recorded in theWritable
as an fs2.StreamTake a function that emits to a
Writable
effectfully, and return a stream which, when run, will perform that function and emit the bytes recorded in theWritable
as an fs2.Stream- Definition Classes
- ioplatform
- def stderr[F[_]](implicit arg0: Async[F]): Pipe[F, Byte, Nothing]
Pipe of bytes that writes emitted values to standard error asynchronously.
Pipe of bytes that writes emitted values to standard error asynchronously.
- Definition Classes
- ioplatform
- def stdin[F[_]](ignored: Int)(implicit arg0: Async[F]): Stream[F, Byte]
Stream of bytes read asynchronously from standard input.
Stream of bytes read asynchronously from standard input. Takes a dummy
Int
parameter for source-compatibility with JVM.- Definition Classes
- ioplatform
- Annotations
- @nowarn()
- def stdin[F[_]](implicit arg0: Async[F]): Stream[F, Byte]
Stream of bytes read asynchronously from standard input.
Stream of bytes read asynchronously from standard input.
- Definition Classes
- ioplatform
- def stdinUtf8[F[_]](ignored: Int)(implicit arg0: Async[F]): Stream[F, String]
Stream of
String
read asynchronously from standard input decoded in UTF-8.Stream of
String
read asynchronously from standard input decoded in UTF-8. Takes a dummyInt
parameter for source-compatibility with JVM.- Definition Classes
- ioplatform
- Annotations
- @nowarn()
- def stdinUtf8[F[_]](implicit arg0: Async[F]): Stream[F, String]
Stream of
String
read asynchronously from standard input decoded in UTF-8.Stream of
String
read asynchronously from standard input decoded in UTF-8.- Definition Classes
- ioplatform
- def stdout[F[_]](implicit arg0: Async[F]): Pipe[F, Byte, Nothing]
Pipe of bytes that writes emitted values to standard output asynchronously.
Pipe of bytes that writes emitted values to standard output asynchronously.
- Definition Classes
- ioplatform
- def stdoutLines[F[_], O](charset: Charset = StandardCharsets.UTF_8)(implicit arg0: Async[F], arg1: Show[O]): Pipe[F, O, Nothing]
Writes this stream to standard output asynchronously, converting each element to a sequence of bytes via
Show
and the givenCharset
.Writes this stream to standard output asynchronously, converting each element to a sequence of bytes via
Show
and the givenCharset
.- Definition Classes
- ioplatform
- def suspendReadableAndRead[F[_], R <: Readable](destroyIfNotEnded: Boolean = true, destroyIfCanceled: Boolean = true)(thunk: => R)(implicit F: Async[F]): Resource[F, (R, Stream[F, Byte])]
Suspends the creation of a
Readable
and aStream
that reads all bytes from thatReadable
.Suspends the creation of a
Readable
and aStream
that reads all bytes from thatReadable
.- Definition Classes
- ioplatform
- def toDuplexAndRead[F[_]](f: (Duplex) => F[Unit])(implicit arg0: Async[F]): Pipe[F, Byte, Byte]
Take a function that reads and writes from a
Duplex
effectfully, and return a pipe which, when run, will perform that function, write emitted bytes to the duplex, and read emitted bytes from the duplexTake a function that reads and writes from a
Duplex
effectfully, and return a pipe which, when run, will perform that function, write emitted bytes to the duplex, and read emitted bytes from the duplex- Definition Classes
- ioplatform
- def toReadable[F[_]](implicit F: Async[F]): Pipe[F, Byte, Readable]
Pipe
that converts a stream of bytes to a stream that will emit a singleReadable
, that ends whenever the resulting stream terminates.Pipe
that converts a stream of bytes to a stream that will emit a singleReadable
, that ends whenever the resulting stream terminates.- Definition Classes
- ioplatform
- def toReadableResource[F[_]](s: Stream[F, Byte])(implicit arg0: Async[F]): Resource[F, Readable]
Like toReadable but returns a
Resource
rather than a single element stream.Like toReadable but returns a
Resource
rather than a single element stream.- Definition Classes
- ioplatform
- def unsafeReadInputStream[F[_]](fis: F[InputStream], chunkSize: Int, closeAfterUse: Boolean = true)(implicit F: Sync[F]): Stream[F, Byte]
Reads all bytes from the specified
InputStream
with a buffer size ofchunkSize
.Reads all bytes from the specified
InputStream
with a buffer size ofchunkSize
. SetcloseAfterUse
to false if theInputStream
should not be closed after use.Recycles an underlying input buffer for performance. It is safe to call this as long as whatever consumes this
Stream
does not store theChunk
returned or pipe it to a combinator that does (e.g.buffer
). UsereadInputStream
for a safe version. - def writeOutputStream[F[_]](fos: F[OutputStream], closeAfterUse: Boolean = true)(implicit F: Sync[F]): Pipe[F, Byte, Nothing]
Writes all bytes to the specified
OutputStream
.Writes all bytes to the specified
OutputStream
. Each chunk is flushed immediately after writing. SetcloseAfterUse
to false if theOutputStream
should not be closed after use. - def writeWritable[F[_]](writable: F[Writable], endAfterUse: Boolean = true)(implicit F: Async[F]): Pipe[F, Byte, Nothing]
Writes all bytes to the specified
Writable
.Writes all bytes to the specified
Writable
.- Definition Classes
- ioplatform
- object IOException
- object InterruptedIOException extends Serializable
- object compression extends compressionplatform