public abstract class AbstractURLStreamHandlerService extends URLStreamHandler implements URLStreamHandlerService
URLStreamHandlerService
interface. All the methods simply invoke the corresponding methods on
java.net.URLStreamHandler except for parseURL
and setURL, which use the URLStreamHandlerSetter
parameter. Subclasses of this abstract class should not need to override the
setURL and parseURL(URLStreamHandlerSetter,...)
methods.| Modifier and Type | Field and Description |
|---|---|
protected URLStreamHandlerSetter |
realHandler
The
URLStreamHandlerSetter object passed to the parseURL
method. |
| Constructor and Description |
|---|
AbstractURLStreamHandlerService() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(URL u1,
URL u2)
This method calls
super.equals(URL,URL). |
int |
getDefaultPort()
This method calls
super.getDefaultPort. |
InetAddress |
getHostAddress(URL u)
This method calls
super.getHostAddress. |
int |
hashCode(URL u)
This method calls
super.hashCode(URL). |
boolean |
hostsEqual(URL u1,
URL u2)
This method calls
super.hostsEqual. |
abstract URLConnection |
openConnection(URL u) |
void |
parseURL(URLStreamHandlerSetter realHandler,
URL u,
String spec,
int start,
int limit)
Parse a URL using the
URLStreamHandlerSetter object. |
boolean |
sameFile(URL u1,
URL u2)
This method calls
super.sameFile. |
protected void |
setURL(URL u,
String proto,
String host,
int port,
String file,
String ref)
Deprecated.
This method is only for compatibility with handlers written
for JDK 1.1.
|
protected void |
setURL(URL u,
String proto,
String host,
int port,
String auth,
String user,
String path,
String query,
String ref)
This method calls
realHandler.setURL(URL,String,String,int,String,String,String,String). |
String |
toExternalForm(URL u)
This method calls
super.toExternalForm. |
openConnection, parseURLprotected volatile URLStreamHandlerSetter realHandler
URLStreamHandlerSetter object passed to the parseURL
method.public abstract URLConnection openConnection(URL u) throws IOException
openConnection in interface URLStreamHandlerServiceopenConnection in class URLStreamHandlerIOExceptionpublic void parseURL(URLStreamHandlerSetter realHandler, URL u, String spec, int start, int limit)
URLStreamHandlerSetter object. This
method sets the realHandler field with the specified
URLStreamHandlerSetter object and then calls
parseURL(URL,String,int,int).parseURL in interface URLStreamHandlerServicerealHandler - The object on which the setURL method
must be invoked for the specified URL.public String toExternalForm(URL u)
super.toExternalForm.toExternalForm in interface URLStreamHandlerServicetoExternalForm in class URLStreamHandlerpublic boolean equals(URL u1, URL u2)
super.equals(URL,URL).equals in interface URLStreamHandlerServiceequals in class URLStreamHandlerpublic int getDefaultPort()
super.getDefaultPort.getDefaultPort in interface URLStreamHandlerServicegetDefaultPort in class URLStreamHandlerpublic InetAddress getHostAddress(URL u)
super.getHostAddress.getHostAddress in interface URLStreamHandlerServicegetHostAddress in class URLStreamHandlerpublic int hashCode(URL u)
super.hashCode(URL).hashCode in interface URLStreamHandlerServicehashCode in class URLStreamHandlerpublic boolean hostsEqual(URL u1, URL u2)
super.hostsEqual.hostsEqual in interface URLStreamHandlerServicehostsEqual in class URLStreamHandlerpublic boolean sameFile(URL u1, URL u2)
super.sameFile.sameFile in interface URLStreamHandlerServicesameFile in class URLStreamHandlerprotected void setURL(URL u, String proto, String host, int port, String file, String ref)
realHandler.setURL(URL,String,String,int,String,String).setURL in class URLStreamHandlerprotected void setURL(URL u, String proto, String host, int port, String auth, String user, String path, String query, String ref)
realHandler.setURL(URL,String,String,int,String,String,String,String).setURL in class URLStreamHandlerCopyright © 2012 JBoss by Red Hat. All Rights Reserved.