read

open override fun read(): Int

Read a single character. #lt are compressed into single newline ('\n') characters. The current line number is incremented whenever a line terminator is read, or when the end of the stream is reached and the last character in the stream is not a line terminator.

Return

The character read, or -1 if the end of the stream has been reached

Throws

IOException

If an I/O error occurs


open override fun read(cbuf: CharArray, off: Int, len: Int): Int

Reads characters into a portion of an array. This method will block until some input is available, an I/O error occurs, or the end of the stream is reached.

If len is zero, then no characters are read and 0 is returned; otherwise, there is an attempt to read at least one character. If no character is available because the stream is at its end, the value -1 is returned; otherwise, at least one character is read and stored into cbuf.

#lt are compressed into single newline ('\n') characters. The current line number is incremented whenever a line terminator is read, or when the end of the stream is reached and the last character in the stream is not a line terminator.

Return

{@inheritDoc}

Parameters

cbuf

{@inheritDoc}

off

{@inheritDoc}

len

{@inheritDoc}

Throws

IOException

{@inheritDoc}