[freenet-cvs] r15674 - in trunk/freenet/src/freenet/support: . io

bombe at freenetproject.org bombe at freenetproject.org
Sat Nov 3 20:06:48 UTC 2007


Author: bombe
Date: 2007-11-03 20:06:48 +0000 (Sat, 03 Nov 2007)
New Revision: 15674

Modified:
   trunk/freenet/src/freenet/support/
   trunk/freenet/src/freenet/support/io/Closer.java
Log:
 r12812 at natrium:  bombe | 2007-11-01 02:39:12 +0100
 add method to close zip files



Property changes on: trunk/freenet/src/freenet/support
___________________________________________________________________
Name: svk:merge
   + 6a5e1407-ac3d-0410-81af-9028a69beae8:/branch/freenet-documentation-browser/src/freenet/support:12812

Modified: trunk/freenet/src/freenet/support/io/Closer.java
===================================================================
--- trunk/freenet/src/freenet/support/io/Closer.java	2007-11-03 18:06:59 UTC (rev 15673)
+++ trunk/freenet/src/freenet/support/io/Closer.java	2007-11-03 20:06:48 UTC (rev 15674)
@@ -22,6 +22,7 @@
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.util.jar.JarFile;
+import java.util.zip.ZipFile;
 
 /**
  * Closes various resources. The resources are checked for being
@@ -79,4 +80,19 @@
 		}
 	}
 
+	/**
+	 * Closes the given zip file.
+	 * 
+	 * @param zipFile
+	 *            The zip file to close
+	 */
+	public static void close(ZipFile zipFile) {
+		if (zipFile != null) {
+			try {
+				zipFile.close();
+			} catch (IOException e) {
+			}
+		}
+	}
+
 }




More information about the cvs mailing list