Top Description Methods
org.osgi.service.url

public Interface URLStreamHandlerService

Known Direct Implementers
org.osgi.service.url.AbstractURLStreamHandlerService
Annotations
@ConsumerType
Imports
java.net.InetAddress, .URL, .URLConnection, org.osgi.annotation.versioning.ConsumerType

Service interface with public versions of the protected java.net.URLStreamHandler methods.

The important differences between this interface and the URLStreamHandler class are that the setURL method is absent and the parseURL method takes a URLStreamHandlerSetter object as the first argument. Classes implementing this interface must call the setURL method on the URLStreamHandlerSetter object received in the parseURL method instead of URLStreamHandler.setURL to avoid a SecurityException.

Author
$Id: 810d8718f5ad689981fbb2c22886ad2695f17297 $
See Also
AbstractURLStreamHandlerService

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(URL u1, URL u2)

public int
public InetAddress
public int
public boolean
hostsEqual(URL u1, URL u2)

public URLConnection
public void
parseURL(URLStreamHandlerSetter
The object on which setURL must be invoked for this URL.
realHandler
,
URL u, String spec, int start, int limit)

Parse a URL.

public boolean
sameFile(URL u1, URL u2)

public String

Method Detail

equalsback to summary
public boolean equals(URL u1, URL u2)
Annotations
@SuppressWarnings:javadoc
See Also
java.net.URLStreamHandler.equals(URL, URL)
getDefaultPortback to summary
public int getDefaultPort()
Annotations
@SuppressWarnings:javadoc
See Also
java.net.URLStreamHandler.getDefaultPort
getHostAddressback to summary
public InetAddress getHostAddress(URL u)
Annotations
@SuppressWarnings:javadoc
See Also
java.net.URLStreamHandler.getHostAddress
hashCodeback to summary
public int hashCode(URL u)
Annotations
@SuppressWarnings:javadoc
See Also
java.net.URLStreamHandler.hashCode(URL)
hostsEqualback to summary
public boolean hostsEqual(URL u1, URL u2)
Annotations
@SuppressWarnings:javadoc
See Also
java.net.URLStreamHandler.hostsEqual
openConnectionback to summary
public URLConnection openConnection(URL u) throws IOException
Annotations
@SuppressWarnings:javadoc
See Also
java.net.URLStreamHandler.openConnection
parseURLback to summary
public void parseURL(URLStreamHandlerSetter realHandler, URL u, String spec, int start, int limit)

Parse a URL. This method is called by the URLStreamHandler proxy, instead of java.net.URLStreamHandler.parseURL, passing a URLStreamHandlerSetter object.

Parameters
realHandler:URLStreamHandlerSetter

The object on which setURL must be invoked for this URL.

Annotations
@SuppressWarnings:javadoc
See Also
java.net.URLStreamHandler.parseURL
sameFileback to summary
public boolean sameFile(URL u1, URL u2)
Annotations
@SuppressWarnings:javadoc
See Also
java.net.URLStreamHandler.sameFile
toExternalFormback to summary
public String toExternalForm(URL u)
Annotations
@SuppressWarnings:javadoc
See Also
java.net.URLStreamHandler.toExternalForm