Delete an entry from property file
<p>How to delete key and value from property file? My property file has these contents:</p>

<pre><code>key1=value1 
key2=value2
</code></pre>

<p>I used the below code to delete the entry <code>key2=value2</code>. After that, now the file has these values:</p>

<pre><code>key1=value1 
key2=value2
Wed Mar 06 12:36:32 IST 2013 
key1=value1
</code></pre>

<p>java code to remove an entry:</p>

<pre><code>FileOutputStream out1 = new FileOutputStream(file, true);
prop.remove(key);
prop.store(out1,null);
</code></pre>

<p>What is the mistake am doing. How to clear the whole content of the file before writing it.</p>
