ewe.io
Class FileWriter

java.lang.Object
  extended byewe.io.Writer
      extended byewe.io.TextWriter
          extended byewe.io.OutputStreamWriter
              extended byewe.io.FileWriter

public class FileWriter
extends OutputStreamWriter

This is a convenience class for writing to files. It creates an FileOutputStream and initializes an OutputStreamWriter to write to it.


Field Summary
 
Fields inherited from class ewe.io.TextWriter
closed, codec, output, stream
 
Fields inherited from class ewe.io.Writer
lock
 
Constructor Summary
FileWriter(File file)
          This method initializes a new FileWriter object to write to the specified File object.
FileWriter(File file, boolean append)
          This method initializes a new FileWriter object to write to the specified File object.
FileWriter(String name)
          This method intializes a new FileWriter object to write to the specified named file.
FileWriter(String name, boolean append)
          This method intializes a new FileWriter object to write to the specified named file.
 
Methods inherited from class ewe.io.OutputStreamWriter
getEncoding, setCodec
 
Methods inherited from class ewe.io.TextWriter
close, flush, print, println, println, write, writeAll
 
Methods inherited from class ewe.io.Writer
getLock, write, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, toString
 

Constructor Detail

FileWriter

public FileWriter(File file)
           throws SecurityException,
                  IOException
This method initializes a new FileWriter object to write to the specified File object.

Parameters:
file - The File object to write to.

FileWriter

public FileWriter(File file,
                  boolean append)
           throws IOException
This method initializes a new FileWriter object to write to the specified File object.

Parameters:
file - The File object to write to.
append - true to start adding data at the end of the file, false otherwise.

FileWriter

public FileWriter(String name)
           throws IOException
This method intializes a new FileWriter object to write to the specified named file.

Parameters:
name - The name of the file to write to

FileWriter

public FileWriter(String name,
                  boolean append)
           throws IOException
This method intializes a new FileWriter object to write to the specified named file. This form of the constructor allows the caller to determin whether data should be written starting at the beginning or the end of the file.

Parameters:
name - The name of the file to write to
append - true to start adding data at the end of the file, false otherwise.