title: Error when downloaded zip files from Google Storage bucket
body: <p>I have a web page on App Engine with Java servlets. This page connects with Google's storage buckets for retrieve zip files. But when they are downloaded, and I try open them, show me a <code>"truncated zip file header"</code> error. And I don't know what it means.</p>
  
  <p>Before in the servlet, I stored all content give for the bucket into a byte array, and then converted it to String because the file was in JSON format. But I tried to do this with the zip file, and I got the above error. I know that the files is fine, so not is that files is broken. I am also using the correct mime type: <code>"application/zip"</code> (I think). So i don't know what can be.</p>
  
  <p>This is basically my code that I use to get files from bucket:</p>
  
  <pre><code>public byte[] getFile(String path) {
     this.storege = StorageOptions.newBuilder().setProjectId(PROJECT_ID).build().getService();
  
     this.blob = storege.get(BlobId.of(PROJECT_URL, path));
  
     byte[] bs = blob.getContent(Blob.BlobSourceOption.generationMatch());
  
     return bs;
  }
  </code></pre>
  
  <p>And, when I worked with JSON files, only convert <code>byte[]</code> into <code>String</code>.</p>
  
  <p>How can I download the files correctly ?</p>
  
  <p>In advance, thank you very much, and excuse my English.</p>