fs2.io

package fs2.io

Provides various ways to work with streams that perform IO.

Attributes

Members list

Concise view

Type members

Classlikes

class ClosedChannelException extends IOException

Attributes

Source:
IOException.scala
Graph
Supertypes
class IOException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
trait Duplex extends Readable with Writable

A facade for Node.js stream.Duplex. Extend or cast to/from your own bindings.

A facade for Node.js stream.Duplex. Extend or cast to/from your own bindings.

Attributes

See also:
Source:
NodeStream.scala
Graph
Supertypes
trait Writable
trait Readable
class Object
trait Any
class Object
trait Matchable
class Any

Attributes

Source:
IOException.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
class InterruptedIOException(message: String, cause: Throwable) extends IOException

Attributes

Companion:
object
Source:
IOException.scala
Graph
Supertypes
class IOException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Known subtypes

Attributes

Companion:
class
Source:
IOException.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
trait Readable

A facade for Node.js stream.Readable. Extend or cast to/from your own bindings.

A facade for Node.js stream.Readable. Extend or cast to/from your own bindings.

Attributes

See also:
Source:
NodeStream.scala
Graph
Supertypes
class Object
trait Any
class Object
trait Matchable
class Any
Known subtypes
trait Duplex
final class StreamDestroyedException extends IOException

Attributes

Source:
NodeStream.scala
Graph
Supertypes
class IOException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
trait Writable

A facade for Node.js stream.Writable. Extend or cast to/from your own bindings.

A facade for Node.js stream.Writable. Extend or cast to/from your own bindings.

Attributes

See also:
Source:
NodeStream.scala
Graph
Supertypes
class Object
trait Any
class Object
trait Matchable
class Any
Known subtypes
trait Duplex

Attributes

Source:
compression.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Types

type IOException = IOException

Attributes

Source:
io.scala

Value members

Concrete methods

def readInputStream[F[_]](fis: F[InputStream], chunkSize: Int, closeAfterUse: Boolean)(implicit F: Sync[F]): Stream[F, Byte]

Reads all bytes from the specified InputStream with a buffer size of chunkSize. Set closeAfterUse to false if the InputStream should not be closed after use.

Reads all bytes from the specified InputStream with a buffer size of chunkSize. Set closeAfterUse to false if the InputStream should not be closed after use.

Attributes

Source:
io.scala
def unsafeReadInputStream[F[_]](fis: F[InputStream], chunkSize: Int, closeAfterUse: Boolean)(implicit F: Sync[F]): Stream[F, Byte]

Reads all bytes from the specified InputStream with a buffer size of chunkSize. Set closeAfterUse to false if the InputStream should not be closed after use.

Reads all bytes from the specified InputStream with a buffer size of chunkSize. Set closeAfterUse to false if the InputStream 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 the Chunk returned or pipe it to a combinator that does (e.g. buffer). Use readInputStream for a safe version.

Attributes

Source:
io.scala
def writeOutputStream[F[_]](fos: F[OutputStream], closeAfterUse: Boolean)(implicit F: Sync[F]): (F, Byte) => Nothing

Writes all bytes to the specified OutputStream. Set closeAfterUse to false if the OutputStream should not be closed after use.

Writes all bytes to the specified OutputStream. Set closeAfterUse to false if the OutputStream should not be closed after use.

Each write operation is performed on the supplied execution context. Writes are blocking so the execution context should be configured appropriately.

Attributes

Source:
io.scala

Inherited methods

def readWritable[F[_] : Async](f: Writable => F[Unit]): 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 the Writable as an fs2.Stream

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 the Writable as an fs2.Stream

Attributes

Inherited from:
ioplatform (hidden)
Source:
ioplatform.scala
def stderr[F[_] : Async]: (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.

Attributes

Inherited from:
ioplatform (hidden)
Source:
ioplatform.scala
def stdin[F[_] : Async](ignored: Int): Stream[F, Byte]

Stream of bytes read asynchronously from standard input. Takes a dummy Int parameter for source-compatibility with JVM.

Stream of bytes read asynchronously from standard input. Takes a dummy Int parameter for source-compatibility with JVM.

Attributes

Inherited from:
ioplatform (hidden)
Source:
ioplatform.scala
def stdin[F[_] : Async]: Stream[F, Byte]

Stream of bytes read asynchronously from standard input.

Stream of bytes read asynchronously from standard input.

Attributes

Inherited from:
ioplatform (hidden)
Source:
ioplatform.scala
def stdinUtf8[F[_] : Async](ignored: Int): Stream[F, String]

Stream of String read asynchronously from standard input decoded in UTF-8. Takes a dummy Int parameter for source-compatibility with JVM.

Stream of String read asynchronously from standard input decoded in UTF-8. Takes a dummy Int parameter for source-compatibility with JVM.

Attributes

Inherited from:
ioplatform (hidden)
Source:
ioplatform.scala
def stdinUtf8[F[_] : Async]: 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.

Attributes

Inherited from:
ioplatform (hidden)
Source:
ioplatform.scala
def stdout[F[_] : Async]: (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.

Attributes

Inherited from:
ioplatform (hidden)
Source:
ioplatform.scala
def stdoutLines[F[_] : Async, O : Show](charset: Charset): (F, O) => Nothing

Writes this stream to standard output asynchronously, converting each element to a sequence of bytes via Show and the given Charset.

Writes this stream to standard output asynchronously, converting each element to a sequence of bytes via Show and the given Charset.

Attributes

Inherited from:
ioplatform (hidden)
Source:
ioplatform.scala
def suspendReadableAndRead[F[_], R <: Readable](destroyIfNotEnded: Boolean, destroyIfCanceled: Boolean)(thunk: => R)(implicit F: Async[F]): Resource[F, (R, Stream[F, Byte])]

Suspends the creation of a Readable and a Stream that reads all bytes from that Readable.

Suspends the creation of a Readable and a Stream that reads all bytes from that Readable.

Attributes

Inherited from:
ioplatform (hidden)
Source:
ioplatform.scala
def toDuplexAndRead[F[_] : Async](f: Duplex => F[Unit]): (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 duplex

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 duplex

Attributes

Inherited from:
ioplatform (hidden)
Source:
ioplatform.scala
def toReadable[F[_]](implicit F: Async[F]): (F, Byte) => Readable

Pipe that converts a stream of bytes to a stream that will emit a single Readable, that ends whenever the resulting stream terminates.

Pipe that converts a stream of bytes to a stream that will emit a single Readable, that ends whenever the resulting stream terminates.

Attributes

Inherited from:
ioplatform (hidden)
Source:
ioplatform.scala

Like toReadable but returns a Resource rather than a single element stream.

Like toReadable but returns a Resource rather than a single element stream.

Attributes

Inherited from:
ioplatform (hidden)
Source:
ioplatform.scala
def writeWritable[F[_]](writable: F[Writable], endAfterUse: Boolean)(implicit F: Async[F]): (F, Byte) => Nothing

Writes all bytes to the specified Writable.

Writes all bytes to the specified Writable.

Attributes

Inherited from:
ioplatform (hidden)
Source:
ioplatform.scala

Deprecated and Inherited methods

def readReadable[F[_]](readable: F[Readable], destroyIfNotEnded: Boolean, destroyIfCanceled: Boolean)(implicit F: Async[F]): Stream[F, Byte]

Attributes

Deprecated
true
Inherited from:
ioplatform (hidden)
Source:
ioplatform.scala