列出Zip文件的内容
/**来 自 N o w J a v a . c o m**/ import java.io.IOException; import java.util.Enumeration; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; public class Main { public static void main(String args[]) { try { ZipFile zipFile = new ZipFile("c:/Folder/Files.zip"); Enumeration e = zipFile.entries(); System.out.println("Listing zip file contents"); while (e.hasMoreElements()) { ZipEntry entry = (ZipEntry) e.nextElement();//来 自 N o w J a v a . c o m System.out.println(entry.getName());