InputStream class has an abstract method:
abstract int read()
This method reads one byte and returns the byte that was read, or
-1 if it encounters the end of the input source. The designer of a concrete input stream class overrides this method to provide useful functionality. For example, in the
FileInputStream class, this method reads one byte from a file.
System.in is a predefined object of a subclass of
InputStream that allows you to read information from the keyboard.
InputStream class also has nonabstract methods to read an array of bytes or to skip a number of bytes. These methods call the abstract
read method, so subclasses need to override only one method.
OutputStream class defines ...