[Schmitzm-commits] r1473 - trunk/schmitzm-core/src/main/java/de/schmitzm/io

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Sun Jan 30 00:55:29 CET 2011


Author: alfonx
Date: 2011-01-30 00:55:28 +0100 (Sun, 30 Jan 2011)
New Revision: 1473

Modified:
   trunk/schmitzm-core/src/main/java/de/schmitzm/io/IOUtil.java
Log:


Modified: trunk/schmitzm-core/src/main/java/de/schmitzm/io/IOUtil.java
===================================================================
--- trunk/schmitzm-core/src/main/java/de/schmitzm/io/IOUtil.java	2011-01-29 21:58:45 UTC (rev 1472)
+++ trunk/schmitzm-core/src/main/java/de/schmitzm/io/IOUtil.java	2011-01-29 23:55:28 UTC (rev 1473)
@@ -1359,13 +1359,19 @@
 		return new File(url.getPath()).getName();
 	}
 
-	static public void unzipArchive(File archive, File outputDir)
+	/**
+	 * @return number of unzipped entries
+	 */
+	static public long unzipArchive(File archive, File outputDir)
 			throws ZipException, IOException {
 		ZipFile zipfile = new ZipFile(archive);
+		long fileCounter = 0;
 		for (Enumeration e = zipfile.entries(); e.hasMoreElements();) {
+			fileCounter++;
 			ZipEntry entry = (ZipEntry) e.nextElement();
 			unzipEntry(zipfile, entry, outputDir);
 		}
+		return fileCounter;
 	}
 
 	static public void unzipEntry(ZipFile zipfile, ZipEntry entry,



More information about the Schmitzm-commits mailing list