title: Most readable way to write a ZipEntry to File?
body: <p>Given <a href="http://docs.oracle.com/javase/1.4.2/docs/api/java/util/zip/ZipFile.html" rel="noreferrer">ZipFile</a> <code>zip</code>, its <a href="http://docs.oracle.com/javase/1.4.2/docs/api/java/util/zip/ZipEntry.html" rel="noreferrer">ZipEntry</a> <code>entry</code> and target <a href="http://docs.oracle.com/javase/1.4.2/docs/api/java/io/File.html" rel="noreferrer">File</a> <code>unzippedEntryFile</code>, what is the most readable way to write <code>entry</code> to <code>unzippedEntryFile</code>?</p>
  
  <p>I came up with following solution using <a href="http://code.google.com/p/guava-libraries/" rel="noreferrer">Google Guava</a> and <a href="http://commons.apache.org/io/" rel="noreferrer">Apache.Commons.IO</a>:</p>
  
  <pre class="lang-java prettyprint-override"><code>InputSupplier&lt;ByteArrayInputStream&gt; entryInputSupplier = ByteStreams.newInputStreamSupplier(IOUtils.toByteArray(zip.getInputStream(entry)));
  Files.copy(entryInputSupplier, unzippedEntryFile);
  </code></pre>
  
  <p>However, something tells me it can be made simplier.</p>
  
  <p>Thanks,<br>
  Konrad</p>