read

open suspend override fun read(b: CharBuffer): Int

Attempts to read characters into the specified character buffer. The buffer is used as a repository of characters as-is: the only changes made are the results of a put operation. No flipping or rewinding of the buffer is performed.

Return

The total number of characters read into the buffer, or -1 if there is no more data because the end of the stream has been reached

Parameters

b

the buffer into which the data is read

Throws

if an I/O error occurs

if the buffer is read-only