How do I edit a text file in Java?
807588Mar 22 2009 — edited Mar 22 2009Hi everyone,
I'd like to open a text file and edit the text, that is to change and edit a text file, that already has been written, such as add text in the middle or at the begining of the text file.
I used RandomAccessFile class and seek method to work with text files, but I connot use it to add text to the middle of the file or to the begining of an already written text file.
Is there a way in Java to add text to the begining or the middle of a text file?
Thank you,