over write file in java

possible duplicate : Reading a text file in Java

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 than overwritten.

what is the mistake?


Download over.write.file.in.java.zip
Direct Link


Download


Download over.write.file.in.java.zip
Mediafire


Download


Download over.write.file.in.java.zip
Filedais


Download