readLine

fun readLine(ignoreLF: Boolean, term: BooleanArray?): String?

Reads a line of text. A line is considered to be terminated by any one of a line feed ('\n'), a carriage return ('\r'), a carriage return followed immediately by a line feed, or by reaching the end-of-file (EOF).

Return

A String containing the contents of the line, not including any line-termination characters, or null if the end of the stream has been reached without reading any characters

Parameters

ignoreLF

If true, the next '\n' will be skipped

term

Output: Whether a line terminator was encountered while reading the line; may be null.

See also

java.io.LineNumberReader.readLine

Throws

IOException

If an I/O error occurs


open fun readLine(): String?

Reads a line of text. A line is considered to be terminated by any one of a line feed ('\n'), a carriage return ('\r'), a carriage return followed immediately by a line feed, or by reaching the end-of-file (EOF).

Return

A String containing the contents of the line, not including any line-termination characters, or null if the end of the stream has been reached without reading any characters

See also

java.nio.file.Files.readAllLines

Throws

IOException

If an I/O error occurs