Appending to a File
Hi,
I am writing to a file using the following:
try
{
outputFile = new File("C:\\ValidationReport.txt");
out = new FileWriter(outputFile);
}
catch(IOException ioe)
{
System.out.println("IOException reading request, ignored" +ioe.getMessage());
}
and also:
try {
out.write("\n" + "Date: " + sdf.format(cal.getTime())+ "\n" + "\t" + "UPDATE SUCCESSFUL"+"\n");
out.flush();
}
catch(IOException ioe)
{
System.out.println("IOException reading request, ignored" +ioe.getMessage());
}
It works but I need to append somewhere in the code instead of overwriting each time. Can someone tell me how to do this please - Thank you.

