Readers Writers  «Prev  Next»


Lesson 7Filtered Readers Writers
ObjectiveWrite a program that reads a \u-escaped file and converts it to pure Unicode.

Filtered Readers Writers

The java.io.FilterReader and java.io.FilterWriter classes are abstract classes that read characters and filter the data in some way before passing it along. For example, you can imagine a FilterReader that converted all characters to uppercase.
The FilterReader has a single constructor and no other methods except those inherited from the superclass, java.io.Reader.
protected FilterReader(Reader in)

The FilterWriter class also has a single constructor and no other unique methods.
protected FilterWriter(Writer in)

There are no concrete subclasses of FilterReader or FilterWriter in the java packages. The classes exist only so you can write your own subclasses.

Filtered Readers Writers - Exercise

Click the Exercise link below to write a program that reads a \u-escaped file and converts it to pure Unicode.
Filtered Readers Writers - Exercise