How to traverse a ZIP file in Java using "Zip File System Provider"?
<p>I have a JSP application that allows the user to upload a ZIP file and then the application will read all the files in the ZIP and store them in a MySQL.</p>

<p>Upon advice I decided to use "Zip File System Provider" to handle the ZIP file:</p>

<pre><code>Path zipPath = Paths.get(zipFile.getSubmittedFileName());//returns the path to the ZIP file
FileSystem fs = FileSystems.newFileSystem(zipPath, null);//creates the file system
</code></pre>

<p>I tried to traverse it using:</p>

<pre><code>for (FileStore store: fs.getFileStores()) {
         System.err.println("Store:  " + store.name());
}
</code></pre>

<p>However it loops only one time and returns <code>tmp.zip</code>which is the entire ZIP. How do I extract the physical image files one by one so I can store them in MySQL.</p>