org.xwiki.classloader.internal.protocol.jar
Class JarURLStreamHandler
java.lang.Object
java.net.URLStreamHandler
org.xwiki.classloader.internal.protocol.jar.JarURLStreamHandler
- All Implemented Interfaces:
- ExtendedURLStreamHandler
@Component(value="jar")
public class JarURLStreamHandler
- extends java.net.URLStreamHandler
- implements ExtendedURLStreamHandler
Handler for the "jar" protocol. Note that we don't use the JDK's JAR URL Connection class since it doesn't support
using a URL Stream Handler Factory for handling nested protocols (the protocol inside the "jar" protocol, for
example: jar:http://... or jar:attachmentjar://..., etc).
- Since:
- 2.0.1
- Version:
- $Id$
|
Method Summary |
java.lang.String |
getProtocol()
|
java.net.URLConnection |
openConnection(java.net.URL url)
|
protected void |
parseURL(java.net.URL u,
java.lang.String spec,
int start,
int limit)
Implementation copied from Emory's Classloader Utilities. |
| Methods inherited from class java.net.URLStreamHandler |
equals, getDefaultPort, getHostAddress, hashCode, hostsEqual, openConnection, sameFile, setURL, setURL, toExternalForm |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JarURLStreamHandler
public JarURLStreamHandler()
getProtocol
public java.lang.String getProtocol()
-
- Specified by:
getProtocol in interface ExtendedURLStreamHandler
- See Also:
ExtendedURLStreamHandler.getProtocol()
openConnection
public java.net.URLConnection openConnection(java.net.URL url)
throws java.io.IOException
-
- Specified by:
openConnection in class java.net.URLStreamHandler
- Throws:
java.io.IOException- See Also:
URLStreamHandler.openConnection(URL)
parseURL
protected void parseURL(java.net.URL u,
java.lang.String spec,
int start,
int limit)
-
Implementation copied from Emory's Classloader Utilities. We had to copy it since we cannot extend Emory's
JarURLStreamHandler implementation since it extends the JDK's JAR URL Connection (see this class's description
to understand why we cannot use it).
- Overrides:
parseURL in class java.net.URLStreamHandler
- See Also:
URLStreamHandler.parseURL(URL, String, int, int)
Copyright © 2004-2011 XWiki. All Rights Reserved.