title: Inserting text into an existing file via Java
body: <p>I would like to create a simple program (in Java) which edits text files - particularly one which performs inserting arbitrary pieces of text at random positions in a text file. This feature is part of a larger program I am currently writing.</p>
  
  <p>Reading the description about java.util.RandomAccessFile, it appears that any write operations performed in the middle of a file would actually overwrite the exiting content.   This is a side-effect which I would like to avoid (if possible).</p>
  
  <p>Is there a simple way to achieve this?</p>
  
  <p>Thanks in advance.</p>