|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--TextFileWrite
This example program reads lines of text from the console and writes them out to a file.
| Constructor Summary | |
TextFileWrite(java.lang.String fn)
Create a new TextFileWrite object with which to read and write. |
|
| Method Summary | |
void |
close()
Close the stream. |
static void |
main(java.lang.String[] arg)
Test harness for this class. |
void |
writeOneLine(java.lang.String s)
Write one line on the output file. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TextFileWrite(java.lang.String fn)
throws java.io.IOException
fn - the name of the file to write.| Method Detail |
public void writeOneLine(java.lang.String s)
public void close()
throws java.io.IOException
java.io.IOException - if there is an error closing the file
public static void main(java.lang.String[] arg)
throws java.io.IOException
arg - arg[0] name of the file to read. Defaults to sampleOut.txt if
not specified.
java.io.IOException - if there is an error opening or closing the file
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||