Writer

zio.blocks.streams.io.Writer
See theWriter companion class
object Writer

Companion object for Writer. Provides factory constructors for common sinks: closed, single, limited, fromOutputStream, and fromWriter.

Attributes

Companion
class
Source
Writer.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Writer.type

Members list

Value members

Concrete methods

def closed: Writer[Any]

A pre-closed writer that rejects all writes.

A pre-closed writer that rejects all writes.

Attributes

Source
Writer.scala

Wraps a java.io.OutputStream as a Writer[Byte]. Calling close() flushes and closes the underlying stream.

Wraps a java.io.OutputStream as a Writer[Byte]. Calling close() flushes and closes the underlying stream.

Attributes

Source
Writer.scala
def fromWriter(w: Writer): Writer[Char]

Wraps a java.io.Writer as a Writer[Char]. Calling close() flushes and closes the underlying writer.

Wraps a java.io.Writer as a Writer[Char]. Calling close() flushes and closes the underlying writer.

Attributes

Source
Writer.scala
def limited[Elem](inner: Writer[Elem], n: Long): Writer[Elem]

A writer that accepts at most n elements from inner, then auto-closes. The dual of Stream.take.

A writer that accepts at most n elements from inner, then auto-closes. The dual of Stream.take.

Attributes

Source
Writer.scala
def single[Elem]: Writer[Elem]

A writer that accepts exactly one element, then auto-closes. The dual of Reader.single.

A writer that accepts exactly one element, then auto-closes. The dual of Reader.single.

Attributes

Source
Writer.scala