class HCReader : Closeable
Provides convenience methods to parse the input data, with clear error handling and line numbering.
reader - the reader to use to read the input
tokenDelimiter - the delimiter to use to separate tokens
<init> |
Provides convenience methods to parse the input data, with clear error handling and line numbering. HCReader(reader: Reader, tokenDelimiter: Regex = DEFAULT_HASHCODE_INPUT_DELIMITER) |
lineNumber |
The current line number. The value is 0 while nothing has been read yet, because the reader's position is considered to be before line 1. val lineNumber: Int |
close |
Releases potential resources used by the reader. Should be called when parsing is over. fun close(): Unit |
nextLineText |
Reads and returns the whole next line of input. fun nextLineText(): String |
nextLineTokens |
Reads and returns the next line of input as a list of strings. fun nextLineTokens(): List<String> |
readBoolean |
Reads the next token of the input as a boolean. fun readBoolean(): Boolean |
readDouble |
Reads the next token of the input as a double. fun readDouble(): Double |
readInt |
Reads the next token of the input as an int. fun readInt(): Int |
readString |
Reads the next token of the input as a string. fun readString(): String |
skip |
Skips the next n tokens of input. fun skip(n: Int = 1): Unit |