public class JarHandler extends URLStreamHandler
| Constructor and Description |
|---|
JarHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected URLConnection |
openConnection(URL u)
Returns a connection to the jar file pointed by this
URL
in the file system |
protected void |
parseURL(URL url,
String spec,
int start,
int limit)
Parses the clear text URL in
str into a URL object. |
protected String |
toExternalForm(URL url)
Build and return the externalized string representation of url.
|
equals, getDefaultPort, getHostAddress, hashCode, hostsEqual, openConnection, sameFile, setURL, setURLprotected URLConnection openConnection(URL u) throws IOException
URL
in the file systemopenConnection in class URLStreamHandleru - java.net.URL The URL to which the connection is pointing toIOException - thrown if an IO error occurs when this method tries to
establish connection.protected void parseURL(URL url, String spec, int start, int limit)
URLStreamHandlerstr into a URL object. URL strings
generally have the following format:
http://www.company.com/java/file1.java#reference
The string is parsed in HTTP format. If the protocol has a different URL format this method must be overridden.
parseURL in class URLStreamHandlerurl - URL the context URLspec - java.lang.String the spec stringstart - int the location to start parsing fromlimit - int the location where parsing endsURLStreamHandler.toExternalForm(java.net.URL),
URLprotected String toExternalForm(URL url)
toExternalForm in class URLStreamHandlerurl - a URLURLStreamHandler.parseURL(java.net.URL, java.lang.String, int, int),
URL.toExternalForm()