title: embedded Android: xml file is empty after board shutdown
body: <p>I'm working on an embedded android project and I'm facing a weird problem.
  I'm saving values on xml config files (using the transform class). I'm sure that the save operation finished (but I have to handle the save not finished case later).</p>
  
  <p>if I shutdown the board in the screen where the files are saved. After the next startup, the config files are empty!!!!</p>
  
  <p>I tried FileWriter and FileOutputStream instead of the transform class (I, of course, closed the stream after use) but I'm facing the same problem.</p>
  
  <p>I tried to use a backup file to avoid this issue: I write into a new file, then delete the original one and renamed the new one with the original name. this solution doesn't fix the problem!!
  I tried another solution: I created a backup file. I saved into this one, and then I copied this one into the original one (without any deleting). after my test case, the two files are empty!!!!</p>
  
  <p>I's really a weird problem!! does anyone faced the same issue on android or on another os? I saw that question too <a href="https://stackoverflow.com/questions/6611503/content-of-xml-file-created-by-java-app-dissapears-if-computer-is-shut-down">content of XML file created by java app dissapears if computer is shut down</a> and I think it's a the same issue.
  Is this a java issue? any solutions?</p>
  
  <p>Thank you for your help</p>
  
  <p>Regards</p>