StringReader
class in package klyn.io

    public class StringReader extends Object implements TextReader:

Object
└ StringReader
All Implemented Interfaces: TextReader

Text reader backed by an in-memory string.

`StringReader` is useful for APIs that consume a `TextReader`, such as XML parsers, without creating a temporary file.

Example

    import klyn.io

    reader = StringReader("first\nsecond")
    print(reader.readLine())
    print(reader.readAllText())

Inherited Properties
property Inherited Properties from Object: type
Constructors

Modifier and Type | Member | Description
--- | --- | ---
public | StringReader `StringReader(text as String):` | Creates a reader over a string.

Methods

Modifier and Type | Member | Description
--- | --- | ---
public | close `close() as Void:` | Closes the reader.
public | readAllText `readAllText() as String throws IOException:` | Reads the remaining text.
public | readLine `readLine() as String throws IOException:` | Reads one line from the current reader position.
public | readLines `readLines() as ArrayList<String> throws IOException:` | Reads all remaining lines from the current reader position.

Inherited Methods
method Inherited Methods from Object: deepCopy, fromJson, toDict, toJson, toString, toXml
method Inherited Methods from TextReader: readAllText, readLine, readLines
method Inherited Methods from AutoClosable: close