loader image
Skip to main content
If you continue browsing this website, you agree to our policies:
x
Completion requirements

This chapter discusses Java's FileReader and BufferedReader classes in detail. FileReader and BufferedReader classes are used together when reading data from an external file. The use of the BufferedReader class allows data to be buffered as it is read from a file before manipulating it. The readLine() method of the BufferedReader class reads a line of text from a character-oriented input stream, and puts it into a new String object.

2. Reader Streams


Answer:

Reader

Reader Streams

readerHierarchy (1)

The diagram shows some of the classes in the Reader hierarchy. Look at your Java documentation for details of these and other classes. You should not expect to remember everything in the java.io package, but you should be familiar enough so that you can look in the documentation for what you need.

The Reader hierarchy looks much like the Writer hierarchy.


Question 2:

(Thought question: ) What two classes are used together for efficient input of characters from a file?