Maybe
you should try the
Java in General Forum.
1) Work in memory and then write the file using DataOutput, OutputStream or Writer.
2) Directly into the file using RandomAccessFile.
If what you really want is to look for text to replace, (the question is a bit too simple) try the regular expression feature.
ps. c'mon, let's try searching the Javadoc or even google, plz.
[ March 21, 2006: Message edited by: Eiji Seki ]