title: android : Zip Folder is invalid
body: <p>i have a created 3 xml files and compressed into a zip folder . The folder is send from server. When i download the zip folder through browser, its working properly and can extract the files. But when i download it from android application and store in SD card, it is corrupted. I pulled the file from SD card to computer and tried to extract the folder, it shows <strong>Zip Folder is invalid</strong> . My code is given below :</p>
  
  <pre><code>DefaultHttpClient httpclient1 = new DefaultHttpClient();
                  HttpPost httpPostRequest = new HttpPost(
                          Configuration.URL_FEED_UPDATE);
                              byte[] responseByte = httpclient1.execute(httpPostRequest,
                          new BasicResponseHandler()).getBytes();
  
                  InputStream is = new ByteArrayInputStream(responseByte);
  
  
                  // ---------------------------------------------------
  
                  File file1 = new File(Environment
          .getExternalStorageDirectory() + "/ast");
                  file1.mkdirs();
                  //
                   File outputFile = new File(file1, "ast.zip");
                  FileOutputStream fos = new FileOutputStream(outputFile);
  
                  byte[] buffer = new byte[1024];
                  int len1 = 0;
                  while ((len1 = is.read(buffer)) != -1) {
                      fos.write(buffer, 0, len1);
                  }
                  fos.close();                
                  is.close();
  </code></pre>
  
  <p>When I used     </p>
  
  <pre><code>ZipInputStream zin = new ZipInputStream(new BufferedInputStream(is));
  </code></pre>
  
  <p>The <code>ZipInputStream</code> can't store values from stream.</p>