AbstractTextWriter
class in package klyn.io

    public abstract class AbstractTextWriter implements TextWriter:

AbstractTextWriter
All Implemented Interfaces: TextWriter

Convenience base class for concrete `TextWriter` implementations.

This class centralizes line-oriented helpers while keeping `TextWriter` itself as the public interface contract.

    import klyn.io

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

Methods

Modifier and Type | Member | Description
--- | --- | ---
public abstract | close `close() as Void throws IOException` | Flushes and closes the writer.
public abstract | 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.

Methods inherited from TextWriter: write, writeChar, writeLine, writeLines
Methods inherited from AutoClosable: close