Java 1.1 introduced Reader and Writer classes for character streams, which are used to read/write text files. |
To construct a character output stream, for example: |
PrintWriter out =
|
The OutputStreamWriter constructor takes a byte stream and converts it to a character stream. As a shortcut, use |
PrintWriter out =
|
where FileWriter is a subclass of OutputStreamWriter. |