Android / Java Rewriting file makes it empty?
<p>I am writing to file every 10 second in my application, I need to save data regardless of user input. The file writing code goes as follows,</p>

<pre><code>FileOutputStream fos = new FileOutputStream(new File(CurrentContext.getFilesDir() +  File.separator + "myFile")); 
fos.write(s.toString().getBytes()); 
fos.flush();
fos.close();
</code></pre>
