summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-08-01 02:53:10 (EDT)
committerEike Stepper2007-08-01 02:53:10 (EDT)
commitdc322c6f3ce3dba0bc063a59d780cee54ab138df (patch)
treee0b6797c08ec23357d1beae0a563175e54f8bcd8
parent6e29a309552378ce4cf7aa7df289c1b353c2fcef (diff)
downloadcdo-dc322c6f3ce3dba0bc063a59d780cee54ab138df.zip
cdo-dc322c6f3ce3dba0bc063a59d780cee54ab138df.tar.gz
cdo-dc322c6f3ce3dba0bc063a59d780cee54ab138df.tar.bz2
*** empty log message ***
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/io/IOFilter.java19
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/io/ZIPUtil.java5
2 files changed, 24 insertions, 0 deletions
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/io/IOFilter.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/io/IOFilter.java
new file mode 100644
index 0000000..d8e9455
--- /dev/null
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/io/IOFilter.java
@@ -0,0 +1,19 @@
+/***************************************************************************
+ * Copyright (c) 2004 - 2007 Eike Stepper, Germany.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ **************************************************************************/
+package org.eclipse.net4j.util.io;
+
+/**
+ * @author Eike Stepper
+ */
+public interface IOFilter<T>
+{
+ public T filter(T data);
+}
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/io/ZIPUtil.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/io/ZIPUtil.java
index 6f428e9..e1a0443 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/io/ZIPUtil.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/io/ZIPUtil.java
@@ -63,6 +63,11 @@ public final class ZIPUtil
if (!context.isDirectory())
{
input = context.getInputStream();
+ if (input == null)
+ {
+ throw new IllegalStateException("Input is null for zip entry " + name);
+ }
+
IOUtil.copy(input, zos, buffer);
}
}