|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.Writer java.io.OutputStreamWriter org.zkoss.io.FileWriter
public class FileWriter
Convenience class for writing character files. Unlike java.io.FileWriter, where the default character encoding is used, it accepts different character encoding.
Field Summary |
---|
Fields inherited from class java.io.Writer |
---|
lock |
Constructor Summary | |
---|---|
FileWriter(java.io.FileDescriptor fd,
java.lang.String charset)
Constructs a FileWriter object associated with a file descriptor. |
|
FileWriter(java.io.File file,
java.lang.String charset)
Constructs a FileWriter object given a File object. |
|
FileWriter(java.io.File file,
java.lang.String charset,
boolean append)
Constructs a FileWriter object given a File object. |
|
FileWriter(java.lang.String filename,
java.lang.String charset)
Constructs a FileWriter object given a file name. |
|
FileWriter(java.lang.String filename,
java.lang.String charset,
boolean append)
Constructs a FileWriter object given a file name with a boolean indicating whether or not to append the data written. |
Method Summary |
---|
Methods inherited from class java.io.OutputStreamWriter |
---|
close, flush, getEncoding, write, write, write |
Methods inherited from class java.io.Writer |
---|
append, append, append, write, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileWriter(java.lang.String filename, java.lang.String charset) throws java.io.IOException
filename
- String The system-dependent filename.charset
- the charset to decode the file, such as UTF-8.
If null, UTF-8 is assumed.
java.io.IOException
- if the named file exists but is a directory
rather than a regular file, does not exist but cannot be created,
or cannot be opened for any other reasonpublic FileWriter(java.lang.String filename, java.lang.String charset, boolean append) throws java.io.IOException
filename
- String The system-dependent filename.charset
- the charset to decode the file, such as UTF-8.
If null, UTF-8 is assumed.append
- boolean if true, then data will be written
to the end of the file rather than the beginning.
java.io.IOException
- if the named file exists but is a directory
rather than a regular file, does not exist but cannot be created,
or cannot be opened for any other reasonpublic FileWriter(java.io.File file, java.lang.String charset) throws java.io.IOException
file
- a File object to write to.charset
- the charset to decode the file, such as UTF-8.
If null, UTF-8 is assumed.
java.io.IOException
- if the named file exists but is a directory
rather than a regular file, does not exist but cannot be created,
or cannot be opened for any other reasonpublic FileWriter(java.io.File file, java.lang.String charset, boolean append) throws java.io.IOException
file
- a File object to write tocharset
- the charset to decode the file, such as UTF-8.
If null, UTF-8 is assumed.append
- if true, then bytes will be written
to the end of the file rather than the beginning
java.io.IOException
- if the named file exists but is a directory
rather than a regular file, does not exist but cannot be created,
or cannot be opened for any other reasonpublic FileWriter(java.io.FileDescriptor fd, java.lang.String charset) throws java.io.IOException
fd
- FileDescriptor object to write to.charset
- the charset to decode the file, such as UTF-8.
If null, UTF-8 is assumed.
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |