Writing Text Files

The java.io.FileWriter class writes text files using the platform's default character encoding and the buffer size. If you need to change these values, construct an OutputStreamReader on a FileOutputStream instead.

 public FileWriter(String fileName) throws IOException
 public FileWriter(String fileName, boolean append) throws IOException
 public FileWriter(File file) throws IOException
 public FileWriter(FileDescriptor fd)
Only the constructors are declared in this class. For example,

FileWriter fw = new FileWriter("36.html");

Previous | Next | Top
Last Modified April 8, 1997
Copyright 1997 Elliotte Rusty Harold
elharo@metalab.unc.edu