Class InputStream

InputStream interface

Methods


close

Closes the InputStream

Example

main
  // FileReader is used in this example, as it implements InputStream.
  FileReader fr = new FileReader "file.dat"
  fr.close
                

(bool) is open

Check if the InputStream is open

Return value

Example

main
  // FileReader is used in this example, as it implements InputStream.
  FileReader fr = new FileReader "file.dat"
  bool result = fr.is open                  // result == true
  fr.close
                

(byte[]) read <int n> bytes

Read bytes from an InputStream.

Parameters

Return value

Exceptions

Example

main
  // FileReader is used in this example, as it implements InputStream.
  FileReader fr = new FileReader "file.dat"
  Byte[] byteArray = fr.read fr.get size bytes
  fr.close