I just found out that when you create an OutputStream on a locked file, it will erase the content of the file. This is already registered in the Javabug list.
Is there another way to lock a file?
Francisco<br />SCJP<br />please use the [code][/code] tags when showing code.Click <a href="http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=ubb_code_page" target="_blank">here</a> to see an example.
Sometimes you feel like a nut. Sometimes you feel like a tiny ad.
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop