writing to the file

Hi, i've got a little problem. I have a text file (about20,000 lines) and i want to write to end this file one control line. how can i do that? i don't want to read hole file, a just want to put one line in file. is there any method for this? such this:

"name_of_file.write("last line");"

thanks for any knowledge, best regards. alcatraz

[358 byte] By [alcatraz123a] at [2007-11-27 7:42:38]
# 1

Build a BufferedWriter on an OutputStreamWriter, which is built on a FileOutputStream that's constructed with the filename, boolean constructor. Whew.

new BufferedReader(new OutputStreamWriter(new FileOutputStream(filename, true)));

http://java.sun.com/j2se/1.5.0/docs/api/java/io/FileOutputStream.html#FileOutputStream(java.lang.String,%20boolean)

hunter9000a at 2007-7-12 19:23:31 > top of Java-index,Java Essentials,Java Programming...
# 2
The key thing in that magical line is the <b>true</b>. It indicates that the file is being opened in append mode: the file will not be truncated and all writes will append to the end of the file.
Hippolytea at 2007-7-12 19:23:31 > top of Java-index,Java Essentials,Java Programming...