title: How to append new data to existing data in properties file?
body: <p>I am using following code for writing data to properties file</p>
  
  <pre><code>public void WritePropertiesFile(String key, String data)
  {
  Properties configProperty = new Properties();
  configProperty.setProperty(key, data);
  File file = new File("D:\\Helper.properties");
  FileOutputStream fileOut = new FileOutputStream(file,true);
  configProperty.store(fileOut, "sample properties");
  fileOut.close();
  }
  
  I am calling the above method 3 times as follows:
  help.WritePropertiesFile("appwrite1","write1");
  help.WritePropertiesFile("appwrite2","write2");
  help.WritePropertiesFile("appwrite3","write3");
  </code></pre>
  
  <p>However, the data in Helper.properties file is displayed as follows:</p>
  
  <pre><code>#sample properties
  #Mon Jul 01 15:01:45 IST 2013
  appwrite1=write1
  #sample properties
  #Mon Jul 01 15:01:45 IST 2013
  appwrite2=write2
  appwrite1=write1
  #sample properties
  #Mon Jul 01 15:01:45 IST 2013
  appwrite3=write3
  appwrite2=write2
  appwrite1=write1
  </code></pre>
  
  <p>I want data to append to existing data and doesn't want duplicate data, that is as follows:</p>
  
  <pre><code>appwrite3=write3
  appwrite2=write2
  appwrite1=write1
  </code></pre>
  
  <p>Please suggest how to do it? </p>