title: How to extract and read entries of zip file which is sent as a byte array
body: <p>In a nutshell I'm trying to write a method which receives the Zip file as byte[] array, and what I want to do is to return the number of entries (the files) that are in the Zip file and test if they're 6 entries.</p>
  
  <p>Here is what I've done so far, which throws <code>FileNotFoundException</code> on <code>line 3</code></p>
  
  <pre><code>  public List&lt;ZipEntry&gt; extractZipEntries(byte[] content) throws IOException {
      List&lt;ZipEntry&gt; entries = new ArrayList&lt;&gt;();
  
      ZipFile zip = new ZipFile(content.toString()); //Line 3
  
      for (Enumeration&lt;?&gt; e = zip.entries(); e.hasMoreElements();) {
          ZipEntry entry = (ZipEntry) e.nextElement();
          entries.add(entry);
      }
      return entries;
    }
  </code></pre>
  
  <p>test is here:</p>
  
  <pre><code> List&lt;ZipEntry&gt; zipEntries = SomeClassName.extractZipEntries(content);
   assertTrue(zipEntries.size() == 6);
  </code></pre>
  
  <p>Also if possible suggest a better approach, but ideally what I doing above is straight forward here. </p>
  
  <p>Thanks!</p>