API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.io. FileWriter View Source
Author(s)
Mark Reinhold
Since
JDK1.1
Version
1.19, 05/11/17
Serial
Hierarchy
 Object
      Writer
          OutputStreamWriter
              FileWriter
Implements
Subclasses
Description
public class FileWriter
  Convenience class for writing character files.
Constructors
public FileWriter (File file) throws IOException
  Constructs a FileWriter object given a File object.
public FileWriter (File file, boolean append) throws IOException
  Constructs a FileWriter object given a File object.
public FileWriter (FileDescriptor fd)
  Constructs a FileWriter object associated with a file descriptor.
public FileWriter (String fileName) throws IOException
  Constructs a FileWriter object given a file name.
public FileWriter (String fileName, boolean append) throws IOException
  Constructs a FileWriter object given a file name with a boolean indicating whether or not to append the data written.
Methods
Hide/Show inherited methods
public Writer append (char c) throws IOException [Inherited From Writer]
  Appends the specified character to this writer.
public Writer append (CharSequence csq) throws IOException [Inherited From Writer]
  Appends the specified character sequence to this writer.
public Writer append (CharSequence csq, int start, int end) throws IOException [Inherited From Writer]
  Appends a subsequence of the specified character sequence to this writer.
public void close () throws IOException [Inherited From OutputStreamWriter] [Specified in Writer]
public void flush () throws IOException [Inherited From OutputStreamWriter] [Specified in Writer]
  Flushes the stream.
pack-private void flushBuffer () throws IOException [Inherited From OutputStreamWriter]
  Flushes the output buffer to the underlying byte stream, without flushing the byte stream itself.
public String getEncoding () [Inherited From OutputStreamWriter]
  Returns the name of the character encoding being used by this stream.
public void write (char[] cbuf) throws IOException [Inherited From Writer]
  Writes an array of characters.
public void write (char[] cbuf, int off, int len) throws IOException [Inherited From OutputStreamWriter] [Specified in Writer]
  Writes a portion of an array of characters.
public void write (int c) throws IOException [Inherited From OutputStreamWriter]
  Writes a single character.
public void write (String str) throws IOException [Inherited From Writer]
  Writes a string.
public void write (String str, int off, int len) throws IOException [Inherited From OutputStreamWriter]
  Writes a portion of a string.
Fields
Hide/Show inherited fields
protected Object lock [Inherited From Writer]
  The object used to synchronize operations on this stream.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar