TextWriter
interface in package klyn.io

    public interface TextWriter extends AutoClosable:

AutoClosable
└ TextWriter

Text writer contract.

A `TextWriter` is not tied to the filesystem. Concrete implementations such as `FileWriter` or `SocketWriter` provide the actual backing resource.

    import klyn.io

    try writer = FilePath("message.txt").openWriter():
    writer.writeLine("hello")

Methods

Modifier and Type | Member | Description
--- | --- | ---
public | write `write(readonly value as String) as Void throws IOException` | Writes raw text.
public | writeChar `writeChar(readonly c as Char) as Void throws IOException` | Writes one character.
public | writeLine `writeLine(readonly line as String) as Void throws IOException` | Writes one line and appends a newline.
public | writeLines `writeLines(readonly lines as List<String>) as Void throws IOException` | Writes all lines with trailing newline.

Inherited Methods
method Inherited Methods from AutoClosable: close