[jboss-cvs] JBossAS SVN: r58268 - projects/microcontainer/trunk/container/src/main/org/jboss/virtual/plugins/context/jar
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Sat Nov 11 16:08:34 EST 2006
Author: scott.stark at jboss.org
Date: 2006-11-11 16:08:32 -0500 (Sat, 11 Nov 2006)
New Revision: 58268
Modified:
projects/microcontainer/trunk/container/src/main/org/jboss/virtual/plugins/context/jar/JarHandler.java
Log:
Override the openStream method to return the input stream of the underlying url
Modified: projects/microcontainer/trunk/container/src/main/org/jboss/virtual/plugins/context/jar/JarHandler.java
===================================================================
--- projects/microcontainer/trunk/container/src/main/org/jboss/virtual/plugins/context/jar/JarHandler.java 2006-11-11 20:43:26 UTC (rev 58267)
+++ projects/microcontainer/trunk/container/src/main/org/jboss/virtual/plugins/context/jar/JarHandler.java 2006-11-11 21:08:32 UTC (rev 58268)
@@ -22,6 +22,7 @@
package org.jboss.virtual.plugins.context.jar;
import java.io.IOException;
+import java.io.InputStream;
import java.net.JarURLConnection;
import java.net.URL;
@@ -66,4 +67,20 @@
throw e;
}
}
+
+ /**
+ * Override to return the input stream of the underlying url rather than
+ * a JarInputStream for the jar as this is not usable for copying the
+ * jar.
+ */
+ @Override
+ public InputStream openStream() throws IOException
+ {
+ checkClosed();
+ String jarURL = getURL().toString();
+ String underlyingURL = jarURL.substring(4, jarURL.length()-2);
+ URL realURL = new URL(underlyingURL);
+ InputStream is = realURL.openStream();
+ return is;
+ }
}
More information about the jboss-cvs-commits
mailing list