possible duplicate : Java: How to read a text file
this is my code:
this.fileMetaDataPrintWriter =
new PrintWriter(new FileOutputStream(new File(fileName), false));
and in other method
fileMetaDataPrintWriter.write(somedata);
these both methods are called in a thread and the filehandle closed when thread exits.
Still my file is appended and not overwritten.
what is the mistake?