org.osgi.service.url

Interface URLStreamHandlerService

public interface URLStreamHandlerService

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.

Version: $Revision: 1.9 $

See Also:

Method Summary
booleanequals(URL u1, URL u2)
intgetDefaultPort()
InetAddressgetHostAddress(URL u)
inthashCode(URL u)
booleanhostsEqual(URL u1, URL u2)
URLConnectionopenConnection(URL u)
voidparseURL(URLStreamHandlerSetter realHandler, URL u, String spec, int start, int limit)
Parse a URL.
booleansameFile(URL u1, URL u2)
StringtoExternalForm(URL u)

Method Detail

equals

public boolean equals(URL u1, URL u2)

See Also: "java.net.URLStreamHandler.equals(URL, URL)"

getDefaultPort

public int getDefaultPort()

See Also: "java.net.URLStreamHandler.getDefaultPort"

getHostAddress

public InetAddress getHostAddress(URL u)

See Also: "java.net.URLStreamHandler.getHostAddress"

hashCode

public int hashCode(URL u)

See Also: "java.net.URLStreamHandler.hashCode(URL)"

hostsEqual

public boolean hostsEqual(URL u1, URL u2)

See Also: "java.net.URLStreamHandler.hostsEqual"

openConnection

public URLConnection openConnection(URL u)

See Also: "java.net.URLStreamHandler.openConnection"

parseURL

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 The object on which setURL must be invoked for this URL.

See Also: "java.net.URLStreamHandler.parseURL"

sameFile

public boolean sameFile(URL u1, URL u2)

See Also: "java.net.URLStreamHandler.sameFile"

toExternalForm

public String toExternalForm(URL u)

See Also: "java.net.URLStreamHandler.toExternalForm"