Package org.osgi.service.url
Class AbstractURLStreamHandlerService
- java.lang.Object
-
- java.net.URLStreamHandler
-
- org.osgi.service.url.AbstractURLStreamHandlerService
-
- All Implemented Interfaces:
URLStreamHandlerService
@ConsumerType public abstract class AbstractURLStreamHandlerService extends java.net.URLStreamHandler implements URLStreamHandlerService
Abstract implementation of theURLStreamHandlerServiceinterface. All the methods simply invoke the corresponding methods onjava.net.URLStreamHandlerexcept forparseURLandsetURL, which use theURLStreamHandlerSetterparameter. Subclasses of this abstract class should not need to override thesetURLandparseURL(URLStreamHandlerSetter,...)methods.
-
-
Constructor Summary
Constructors Constructor Description AbstractURLStreamHandlerService()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanequals(java.net.URL u1, java.net.URL u2)This method callssuper.equals(URL,URL).intgetDefaultPort()This method callssuper.getDefaultPort.java.net.InetAddressgetHostAddress(java.net.URL u)This method callssuper.getHostAddress.inthashCode(java.net.URL u)This method callssuper.hashCode(URL).booleanhostsEqual(java.net.URL u1, java.net.URL u2)This method callssuper.hostsEqual.abstract java.net.URLConnectionopenConnection(java.net.URL u)voidparseURL(URLStreamHandlerSetter realHandler, java.net.URL u, java.lang.String spec, int start, int limit)Parse a URL using theURLStreamHandlerSetterobject.booleansameFile(java.net.URL u1, java.net.URL u2)This method callssuper.sameFile.java.lang.StringtoExternalForm(java.net.URL u)This method callssuper.toExternalForm.
-
-
-
Method Detail
-
openConnection
public abstract java.net.URLConnection openConnection(java.net.URL u) throws java.io.IOException- Specified by:
openConnectionin interfaceURLStreamHandlerService- Throws:
java.io.IOException- See Also:
- "java.net.URLStreamHandler.openConnection"
-
parseURL
public void parseURL(URLStreamHandlerSetter realHandler, java.net.URL u, java.lang.String spec, int start, int limit)
Parse a URL using theURLStreamHandlerSetterobject. This method sets therealHandlerfield with the specifiedURLStreamHandlerSetterobject and then callsparseURL(URL,String,int,int).- Specified by:
parseURLin interfaceURLStreamHandlerService- Parameters:
realHandler- The object on which thesetURLmethod must be invoked for the specified URL.- See Also:
- "java.net.URLStreamHandler.parseURL"
-
toExternalForm
public java.lang.String toExternalForm(java.net.URL u)
This method callssuper.toExternalForm.- Specified by:
toExternalFormin interfaceURLStreamHandlerService- See Also:
- "java.net.URLStreamHandler.toExternalForm"
-
equals
public boolean equals(java.net.URL u1, java.net.URL u2)This method callssuper.equals(URL,URL).- Specified by:
equalsin interfaceURLStreamHandlerService- See Also:
- "java.net.URLStreamHandler.equals(URL,URL)"
-
getDefaultPort
public int getDefaultPort()
This method callssuper.getDefaultPort.- Specified by:
getDefaultPortin interfaceURLStreamHandlerService- See Also:
- "java.net.URLStreamHandler.getDefaultPort"
-
getHostAddress
public java.net.InetAddress getHostAddress(java.net.URL u)
This method callssuper.getHostAddress.- Specified by:
getHostAddressin interfaceURLStreamHandlerService- See Also:
- "java.net.URLStreamHandler.getHostAddress"
-
hashCode
public int hashCode(java.net.URL u)
This method callssuper.hashCode(URL).- Specified by:
hashCodein interfaceURLStreamHandlerService- See Also:
- "java.net.URLStreamHandler.hashCode(URL)"
-
hostsEqual
public boolean hostsEqual(java.net.URL u1, java.net.URL u2)This method callssuper.hostsEqual.- Specified by:
hostsEqualin interfaceURLStreamHandlerService- See Also:
- "java.net.URLStreamHandler.hostsEqual"
-
sameFile
public boolean sameFile(java.net.URL u1, java.net.URL u2)This method callssuper.sameFile.- Specified by:
sameFilein interfaceURLStreamHandlerService- See Also:
- "java.net.URLStreamHandler.sameFile"
-
-