public abstract class AbstractTextWriter implements 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")| Modifier and Type | Member | Description |
|---|---|---|
| public abstract | closeclose() as Void throws IOException |
Flushes and closes the writer. |
| public abstract | writewrite(readonly value as String) as Void throws IOException |
Writes raw text. |
| public | writeCharwriteChar(readonly c as Char) as Void throws IOException: |
Writes one character. |
| public | writeLinewriteLine(readonly line as String) as Void throws IOException: |
Writes one line and appends a newline. |
| public | writeLineswriteLines(readonly lines as List<String>) as Void throws IOException: |
Writes all lines with trailing newline. |