title: Downloaded zip file is invalid
body: <p>I'm trying to download (and later extract) a zip file from my dropbox account using this code</p>
  
  <pre><code>URL url = new URL("-");
  HttpsURLConnection con = (HttpsURLConnection) url.openConnection();
  
  try (InputStream stream = con.getInputStream()) {
      Files.copy(stream, Paths.get(parent.getAbsolutePath() + File.separator + "zippedCache.zip"));
  }
  </code></pre>
  
  <p>The file I'm trying to download is a folder with another folder in it (empty). When I attempt to open the zipped folder, I get something along the lines of "cannot open the folder the compressed zipped folder is invalid" (translated using Google translator). When I unzip it, it's empty.</p>
  
  <p>Can anyone explain what the problem here is?</p>
  
  <p>Edit: Also, the zip folder is empty when I download it using Java, however downloading it normally through a web browser works fine. </p>