title: How do I append to a RandomAccessFile? Every time I run this code, the data get overwritten
body: <p><strong>How do I append data with this snippet of code? Data is always being overwritten each time I run the code.</strong></p>
  
  <pre><code>    try{
          RandomAccessFile fileWriter = new RandomAccessFile("Officers.txt", "rw");
  
          fileWriter.writeUTF(officerObject.getOfficerBadgeNum());
          fileWriter.writeUTF(officerObject.getOfficerFirstName());
          fileWriter.writeUTF(officerObject.getOfficerLastName());
          fileWriter.writeUTF(officerObject.getOfficerPrecint());
  
          fileWriter.close();
          System.out.println("Data Successfully Saved");
      }
      catch (IOException e) {
          System.out.println("Error in File. Could not SAVE Officer");
          e.printStackTrace();
      }
  </code></pre>