|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcds.util.WriteFile
Class for writing a simple ASCII file, line by line
Field Summary | |
(package private) java.io.BufferedWriter |
wrt
|
Constructor Summary | |
WriteFile()
Empty constructor. |
|
WriteFile(java.lang.String filename)
Constructor. |
Method Summary | |
void |
close()
Closes the file. |
void |
open(java.lang.String filename)
Opens a WriteFile object |
void |
wrtline(java.lang.String line)
Writes a line. |
void |
wrtline(java.lang.String line,
boolean flush)
Writes a line. |
void |
wrttext(java.lang.String text)
Writes any kind of text (possibly made of several lines). |
void |
wrttext(java.lang.String text,
boolean flush)
Writes any kind of text (possibly made of several lines). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
java.io.BufferedWriter wrt
Constructor Detail |
public WriteFile()
public WriteFile(java.lang.String filename) throws java.io.IOException
filename
- name of the file. If the filename is null, an empty string
or "out" then the standard output is used. If the file name == "err", the
standard error is used.Method Detail |
public void open(java.lang.String filename) throws java.io.IOException
filename
- name of the file. If the filename is null, an empty string
or "out" then the standard output is used. If the file name == "err", the
standard error is used.
java.io.IOException
public void close() throws java.io.IOException
java.io.IOException
public void wrtline(java.lang.String line) throws java.io.IOException
line
- string to write. A newline sequence is appended automatically
java.io.IOException
public void wrtline(java.lang.String line, boolean flush) throws java.io.IOException
line
- string to write. A newline sequence is appended automaticallyflush
- if true, the file is flushed. Must be used if buffer flushing
should not happen with every write.
java.io.IOException
public void wrttext(java.lang.String text) throws java.io.IOException
text
- string to write, as it is. No newline sequence is appended.
java.io.IOException
public void wrttext(java.lang.String text, boolean flush) throws java.io.IOException
text
- string to write, as it is. No newline sequence is appended.flush
- if true, the file is flushed. Must be used if buffer flushing
should not happen with every write.
java.io.IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |