static int zip2zip_withPredicate(File inZip, ZipOutputStream outZip, IF1 predicate) ctex { temp ZipFile zipFile = new ZipFile(inZip); Enumeration entries = zipFile.entries(); int n = 0; while (entries.hasMoreElements()) { ZipEntry entry = (ZipEntry) entries.nextElement(); continue unless predicate.get(entry.getName()); ++n; outZip.putNextEntry(new ZipEntry(entry.getName())); InputStream fin = zipFile.getInputStream(entry); copyStream(fin, outZip); fin.close(); } ret n; } static int zip2zip_withPredicate(File inZip, File outZip, IF1 predicate) { temp ZipOutputStream outStream = zipOutputStream(outZip); ret zip2zip_withPredicate(inZip, outStream, predicate); }