Package org.osgi.service.url
Interface URLStreamHandlerService
-
- All Known Implementing Classes:
AbstractURLStreamHandlerService
@ConsumerType public interface URLStreamHandlerService
Service interface with public versions of the protectedjava.net.URLStreamHandler
methods.The important differences between this interface and the
URLStreamHandler
class are that thesetURL
method is absent and theparseURL
method takes aURLStreamHandlerSetter
object as the first argument. Classes implementing this interface must call thesetURL
method on theURLStreamHandlerSetter
object received in theparseURL
method instead ofURLStreamHandler.setURL
to avoid aSecurityException
.- Author:
- $Id: 810d8718f5ad689981fbb2c22886ad2695f17297 $
- See Also:
AbstractURLStreamHandlerService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
equals(java.net.URL u1, java.net.URL u2)
int
getDefaultPort()
java.net.InetAddress
getHostAddress(java.net.URL u)
int
hashCode(java.net.URL u)
boolean
hostsEqual(java.net.URL u1, java.net.URL u2)
java.net.URLConnection
openConnection(java.net.URL u)
void
parseURL(URLStreamHandlerSetter realHandler, java.net.URL u, java.lang.String spec, int start, int limit)
Parse a URL.boolean
sameFile(java.net.URL u1, java.net.URL u2)
java.lang.String
toExternalForm(java.net.URL u)
-
-
-
Method Detail
-
openConnection
java.net.URLConnection openConnection(java.net.URL u) throws java.io.IOException
- Throws:
java.io.IOException
- See Also:
- "java.net.URLStreamHandler.openConnection"
-
parseURL
void parseURL(URLStreamHandlerSetter realHandler, java.net.URL u, java.lang.String spec, int start, int limit)
Parse a URL. This method is called by theURLStreamHandler
proxy, instead ofjava.net.URLStreamHandler.parseURL
, passing aURLStreamHandlerSetter
object.- Parameters:
realHandler
- The object on whichsetURL
must be invoked for this URL.- See Also:
- "java.net.URLStreamHandler.parseURL"
-
toExternalForm
java.lang.String toExternalForm(java.net.URL u)
- See Also:
- "java.net.URLStreamHandler.toExternalForm"
-
equals
boolean equals(java.net.URL u1, java.net.URL u2)
- See Also:
- "java.net.URLStreamHandler.equals(URL, URL)"
-
getDefaultPort
int getDefaultPort()
- See Also:
- "java.net.URLStreamHandler.getDefaultPort"
-
getHostAddress
java.net.InetAddress getHostAddress(java.net.URL u)
- See Also:
- "java.net.URLStreamHandler.getHostAddress"
-
hashCode
int hashCode(java.net.URL u)
- See Also:
- "java.net.URLStreamHandler.hashCode(URL)"
-
hostsEqual
boolean hostsEqual(java.net.URL u1, java.net.URL u2)
- See Also:
- "java.net.URLStreamHandler.hostsEqual"
-
sameFile
boolean sameFile(java.net.URL u1, java.net.URL u2)
- See Also:
- "java.net.URLStreamHandler.sameFile"
-
-