How do I edit a properties file without trashing the rest of it
<p><strong>Example.properties</strong></p>

<pre><code>user=somePerson
env=linux
file=mpg
</code></pre>

<p><strong>properties.java class</strong></p>

<pre><code>propertiestTest.java
   {
     Properties props = new Properties();
     props.setProperty("user", "GodIsUser");
     final File propsFile = new File(someDir/Example.properties");

     props.store(new FileOutputStream(propsFile), "");
}
</code></pre>

<p><strong>reseult of Example.properties</strong></p>

<pre><code>user=GodIsUser
</code></pre>

<p>and all other entries are deleted</p>
