When new data is entered in the GUI and exported to the following file it replaces the existing data, how would i prevent this and make it add to the existing data?
thanks
public void exportContacts()
{
FileOutputStream file;
PrintStream out;
try { file = new FileOutputStream("../files/example.buab");
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");
}
}