Class Overview
FileWriter is a class for writing characters out to a file. The default
character encoding, 8859_1 is currently used to convert characters to bytes
in the file.
Summary
| Public Constructors |
|
|
FileWriter(File file)
Creates a FileWriter using the File file.
|
|
|
FileWriter(File file, boolean append)
Creates a FileWriter using the File file.
|
|
|
FileWriter(FileDescriptor fd)
Creates a FileWriter using the existing FileDescriptor fd.
|
|
|
FileWriter(String filename)
Creates a FileWriter using the platform dependent filename.
|
|
|
FileWriter(String filename, boolean append)
Creates a FileWriter using the platform dependent filename.
|
|
[Expand]
Inherited Methods |
From class java.io.OutputStreamWriter
|
void
|
close()
Close this OutputStreamWriter.
|
|
void
|
flush()
Flush this OutputStreamWriter.
|
|
String
|
getEncoding()
Answer the String which identifies the encoding used to convert
characters to bytes.
|
|
void
|
write(char[] buf, int offset, int count)
Writes count characters starting at offset
in buf to this Writer.
|
|
void
|
write(String str, int offset, int count)
Writes count characters starting at offset
in str to this Writer.
|
|
void
|
write(int oneChar)
Writes out the character oneChar to this Writer.
|
|
From class java.io.Writer
|
Writer
|
append(CharSequence csq)
Append a CharSequence csq to the Writer.
|
|
Writer
|
append(CharSequence csq, int start, int end)
Append a subsequence of a CharSequence csq to the Writer.
|
|
Writer
|
append(char c)
Append a char cto the Writer.
|
|
abstract
void
|
close()
Close this Writer.
|
|
abstract
void
|
flush()
Flush this Writer.
|
|
abstract
void
|
write(char[] buf, int offset, int count)
Writes count characters starting at offset in
buf to this Writer.
|
|
void
|
write(String str, int offset, int count)
Writes count number of characters starting at
offset from the String str to this Writer.
|
|
void
|
write(int oneChar)
Writes the specified character oneChar to this Writer.
|
|
void
|
write(char[] buf)
Writes the entire character buffer buf to this Writer.
|
|
void
|
write(String str)
Writes the characters from the String str to this Writer.
|
|
From class java.lang.Object
|
Object
|
clone()
Returns a new instance of the same class as the receiver, whose slots
have been filled in with the values in the slots of the receiver.
|
|
boolean
|
equals(Object o)
Compares the argument to the receiver, and returns true if they represent
the same object using a class specific comparison.
|
|
void
|
finalize()
Called by the virtual machine when there are no longer any (non-weak)
references to the receiver.
|
|
final
Class<? extends Object>
|
getClass()
Returns the unique instance of java.lang.Class which represents the class
of the receiver.
|
|
int
|
hashCode()
Returns an integer hash code for the receiver.
|
|
final
void
|
notify()
Causes one thread which is wait ing on the receiver to be
made ready to run.
|
|
final
void
|
notifyAll()
Causes all threads which are wait ing on the receiver to
be made ready to run.
|
|
String
|
toString()
Returns a string containing a concise, human-readable description of the
receiver.
|
|
final
void
|
wait(long time, int frac)
Causes the thread which sent this message to be made not ready to run
either pending some change in the receiver (as indicated by
notify or notifyAll) or the expiration of
the timeout.
|
|
final
void
|
wait(long time)
Causes the thread which sent this message to be made not ready to run
either pending some change in the receiver (as indicated by
notify or notifyAll) or the expiration of
the timeout.
|
|
final
void
|
wait()
Causes the thread which sent this message to be made not ready to run
pending some change in the receiver (as indicated by notify
or notifyAll).
|
|
From interface java.io.Closeable
|
abstract
void
|
close()
Close the object and release any system resources it holds.
|
|
From interface java.io.Flushable
|
abstract
void
|
flush()
Flushes the object by writing out any buffered data to the underlying
output.
|
|
From interface java.lang.Appendable
|
Public Constructors
public
FileWriter
(File file)
Creates a FileWriter using the File file.
Parameters
| file
| the non-null File to write bytes to. |
public
FileWriter
(File file, boolean append)
Creates a FileWriter using the File file. The parameter
append determines whether or not the file is opened and
appended to or just opened empty.
Parameters
| file
| the non-null File to write bytes to. |
| append
| should the file be appened to or opened empty. |
Creates a FileWriter using the existing FileDescriptor fd.
Parameters
| fd
| the non-null FileDescriptor to write bytes to.
|
public
FileWriter
(String filename)
Creates a FileWriter using the platform dependent filename.
See the class description for how characters are converted to bytes.
Parameters
| filename
| the non-null name of the file to write bytes to. |
public
FileWriter
(String filename, boolean append)
Creates a FileWriter using the platform dependent filename.
See the class description for how characters are converted to bytes. The
parameter append determines whether or not the file is
opened and appended to or just opened empty.
Parameters
| filename
| the non-null name of the file to write bytes to. |
| append
| should the file be appened to or opened empty. |