I want to insert the data at some positions in the text file without actually overwriting on the existing data.I tried RandomAccessFile ....but that also overwrites it.... Is there any way to insert the data without overwriting?? -Thanks in advance
+4
A:
You have to read your file and rewrite it. During this operation you have to find the place where you want to put your text and write it.
Colin Hebert
2010-09-18 20:41:21
+4
A:
It is not possible (not with Java, and not with any other programming language) to "just" insert data in the middle of the file, without having to re-write the rest of the file. The problem is not the programming language, the problem is the way files work.
Thomas Mueller
2010-09-18 20:47:34
So what is your solution for the problem?
darko petreski
2010-09-18 22:05:01
Re-write the rest of the file.
Thomas Mueller
2010-09-19 06:04:25