获取Zip文件中的条目数
import java.io.IOException; import java.util.zip.ZipFile;/*n o w j a v a . c o m - 时 代 Java*/ public class Main { public static void main(String args[]) { try { ZipFile zipFile = new ZipFile("c:/Folder/WebFiles.zip"); int numberOfEntries = zipFile.size(); System.out.println("There are "); System.out.print(numberOfEntries); System.out.print(" entries in zip file :"); System.out.print(zipFile.getName()); zipFile.close(); /* 来 自* 时代Java公众号 - N o w J a v a . c o m */ }