title: Android view zip file without extracting
body: <p>I am trying to get the contents of a zip file without extracting it. I am using ZipFile to get the entries. But what I observed is it is giving all the files in zip folder in file format like system/app.apk instead of giving system as a directory(like how file.listFiles() gives). How do i get the files in a directory structure format? </p>
  
  <p><strong>Zip structure:</strong></p>
  
  <pre><code>   ZipFolder.zip - system (folder) -&gt; app.apk(file)
  
                   - meta (folder) -&gt; manifest(folder) -&gt; new.apk (file)
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>  ZipFile zipFile = new ZipFile(mPath);
    Enumeration&lt;? extends ZipEntry&gt; entries = zipFile.entries();  
        while(entries.hasMoreElements()) {
            // below code returns system/app.apk and meta/manifest/new.apk
            // instead of system,meta folders 
            ZipEntry entry  = entries.nextElement();  
            String fileName = entry.getName();
            boolean isDirectory = entry.isDirectory(); //returns false
        }
  </code></pre>