This page contains an archived post to the Java Answers Forum made prior to February 25, 2002.
If you wish to participate in discussions, please visit the new
Java I/O , Inserting text in middle of File
Posted by mazhar on October 05, 2000 at 3:43 AM
Is there a method of inserting a string into a text file without overwriting existing text content.
I am using RandomAccesFile.
The Text file i have is a record of names under different headings.
so for a particular heading if i need to insert another name,
without deleting existing names what do i need to do.
all names are on different lines.
i am using writeUTF(),and readUTF() to read and write.bcos i need to
be able to do the same even under UNIX.