Writer

In this chapter you will learn:

  1. What is Java Writer and how to use Writer

Use Writer

Writer is the abstract class for writing to character streams.

The following table lists all Writer classes.

  • Writer
    Abstract class that describes character stream output
  • BufferedWriter
    Buffered output character stream
  • CharArrayWriter
    Output stream that writes to a character array
  • FileWriter
    Output stream that writes to a file
  • FilterWriter
    Filtered writer
  • OutputStreamWriter
    Output stream that translates characters to bytes
  • PipedWriter
    Output pipe
  • PrintWriter
    Output stream that contains print( ) and println( )
  • StringWriter
    Output stream that writes to a string

Next chapter...

What you will learn in the next chapter:

  1. How to use FileWriter
  2. Copy a file with FileReader and FileWriter
  3. Append to a text file FileWriter