Listing the Contents of a ZIP File

try { // Open the ZIP file ZipFile zf = new ZipFile("filename.zip"); // Enumerate each entry for (Enumeration entries = zf.entries(); entries.hasMoreElements();) { // Get the entry name String zipEntryName = ((ZipEntry)entries.nextElement()).getName(); } } catch (IOException e) { }

Post a comment

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image. Ignore spaces and be careful about upper and lower case.