IO Class Hierarchy

Classic programmed-learning exercises, refreshed for modern Java and presented in the current MrStyner.com portfolio style.

Modern Java noteThis archive has been refreshed for Java 25 LTS. Core language concepts remain useful, while outdated setup instructions and browser-era Java are labeled or replaced. Java 26 is the current feature release; Java 25 is used here as the stable teaching baseline.
go to previous page   go to home page   go to next page        

Answer:

No.

Of course, C++ is an industrial-strength language, so you would be able to write a C++ program that reads the file. But it would be a lot of trouble to do so.

IO Class Hierarchy

The diagram shows the top of the hierarchy for the java.io package. The dotted clouds are abstract classes. They act as base classes for specialized streams (to be discussed shortly).

Java IO hierarchy

Streams are byte-oriented or character-oriented. Each type has input streams and output streams.

  1. Byte-oriented streams.
    • Intended for general-purpose input and output.
    • Data may be primitive data types or raw bytes.
  2. Character-oriented streams.
    • Intended for character data.
    • Data is transformed from/to 16 bit Java char used inside programs to the UTF format used externally.

QUESTION 7:

Is a Reader an input stream or an output stream?