klyn.io.FileInputStream.read
method
public read() as String throws IOException
Description

Reads the remaining file contents as strict UTF-8, from the current byte position to end-of-file. Use readBytes for undecoded binary contents.

Returns

Decoded text, or an empty string when already at end-of-file.

Throws
  • IOException if the stream is closed, reading fails, or the remaining bytes are not valid UTF-8.
Example

text = stream.read()