TextWriter
interfacein packageklyn.io
public interface TextWriter extends AutoClosable:
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 |
Writes raw text. |
| public |
writeChar |
Writes one character. |
| public |
writeLine |
Writes one line and appends a newline. |
| public |
writeLines |
Writes all lines with trailing newline. |