read

abstract fun read(cbuf: CharArray, off: Int, len: Int): Int

Reads up to len characters into cbuf starting at offset off. Returns the number of characters read, or -1 if the end of the stream is reached.


open fun read(): Int

Reads a single character.

The default implementation uses read on a one-character buffer.


open override fun read(target: CharBuffer): Int

Reads characters into a CharBuffer. This default implementation reads into an array and then puts the characters into the buffer.