How would i delete data from an external file?
<p>The format i have in the external file is </p>

<pre><code>name
tel no
mob no
address
</code></pre>

<p>From the gui i would like to delete a contact which is in the format of above using my delete button.</p>

<p>i have completed the export method and was wondering if deleting would be similar,, here is my code for exporting.</p>

<pre><code> {
   FileOutputStream file; 
   PrintStream out; 

   try {   file = new FileOutputStream("../files/example.buab", true);   
          out = new PrintStream(file);       
          out.println(txtname.getText());      
          out.println(txtnum.getText());     
          out.println(txtmob.getText());
          out.println(txtadd1.getText()); 

          System.err.println ("");                    
          out.close();              
       }            
          catch (Exception e)
                {                   
                 System.err.println ("Error in writing to file");          
                }
   }
</code></pre>
