title: Recreate Directory Structure and extract Files From byte array of a zip file in Java
body: <p>I have a byte array of zip File , I need to create zip file from that and than unzip the files and folders inside that .</p>
  
  <p>I tries to do that but getting zip entries null </p>
  
  <pre><code>{
  ResponseEntity&lt;byte[]&gt; result = restTemplate.exchange(builder.build().toString(), HttpMethod.GET, httpEntity, byte[].class);
      ZipInputStream zipStream = new ZipInputStream(new ByteArrayInputStream(result.getBody()))
      ZipEntry entry = null;
      while ((entry = zipStream.getNextEntry()) != null)
  }
  </code></pre>
  
  <p>Zip File is like</p>
  
  <ul>
  <li>DIR -> b.txt </li>
  <li>DIR -> x.php ,a.txt</li>
  </ul>
  
  <p>Thanks in Advance</p>