read
Reads a single character from the stream:contentReferenceoaicite:5{index=5}. Returns the character as an integer (0-65535) or -1 if the end of the stream has been reached:contentReferenceoaicite:6{index=6}.
Throws
if an I/O error occurs.
Reads up to len characters into the specified portion of the character array cbuf:contentReferenceoaicite:7{index=7}. It returns the number of characters read, or -1 if the end of the stream has been reached before any characters are read:contentReferenceoaicite:8{index=8}. This method will block until at least one character is available or end-of-stream is detected.
Return
the number of characters read, or -1 if no characters were read because the stream is at EOF.
Parameters
the destination buffer.
the start offset in cbuf at which to store characters.
the maximum number of characters to read.
Throws
if the parameters are invalid.
if an I/O error occurs.