Rewriting to a file

Hi,

I am in a very critical problem,

I read some text from a file and made some operations on it and stored it to another file. This time i want to make operations on the text in new file and this step has to be repeated for a particular number of times. Each time the text in the new file has to be updated according to the operation and it will be input for next operation. So please can anybody give me some idea

Thanks in advance.

[460 byte] By [subhakarkatamaneni@yahoo.co.ina] at [2007-10-2 21:18:34]
# 1
And what is question?
BIJ001a at 2007-7-14 0:27:33 > top of Java-index,Java Essentials,Java Programming...
# 2

First of all thanks for replying.

I am writing the filewriter in a method and writing text to the file called "temp.txt" using that filewriter. According to the requirement method will be called multiple times so when the method is called again "temp.txt" is being emptied as filewriter is being called again . So my question how can i write so that "temp.txt" is not emptied when the method is called.

subhakarkatamaneni@yahoo.co. at 2007-7-14 0:27:33 > top of Java-index,Java Essentials,Java Programming...
# 3
better way u can use property file instead of .txt file.u can read and write in that property fileregardspradeep
Pradeep_M_Va at 2007-7-14 0:27:33 > top of Java-index,Java Essentials,Java Programming...
# 4

> better way u can use property file instead of .txt

> file.u can read and write in that property file

>

> regards

> pradeep

You should only use a property file is there are key-value pairs in the file, and if all keys are unique.

@OP. Why aren't you loading the file into memory, and then performs all operations on it before you save?

Kaj

kajbja at 2007-7-14 0:27:33 > top of Java-index,Java Essentials,Java Programming...
# 5
Rename temp.txt to something else, open it, write to temp.txt, delete the other file.
ejpa at 2007-7-14 0:27:33 > top of Java-index,Java Essentials,Java Programming...