title: saving base64 decoded string into a zip file
body: <p>I am trying to save a base64 decoded string into a zip file using the mentioned code:</p>
  
  <pre><code>Writer out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream("/home/wemohamm/Desktop/test.zip")));
  out.write(decodedString);
  out.close();
  </code></pre>
  
  <p>Here <code>decodedString</code> contains base64 decoded string and I can output it.
  I am running the code in rhel6 with Java 1.6. When I try to open the zip, it says error occurred while opening file.</p>
  
  <p>The same code if I use with Windows 7 Java 1.6 with path <code>c:\\test\test.zip</code> is working fine.</p>
  
  <p>Is the zip not getting saved correctly in rhel6 or if there is any code modifications I need to do? </p>