be.ugent.caagt.swirl.protocol
Class MappedURLStreamHandlerFactory
java.lang.Object
be.ugent.caagt.swirl.protocol.MappedURLStreamHandlerFactory
- URLStreamHandlerFactory
public class MappedURLStreamHandlerFactory
extends java.lang.Object
implements URLStreamHandlerFactory
URLStreamHandlerFactory
which allows run time registration of new handlers.
This is mainly useful in those cases where it is not easy to configure new
protocols the standard way, i.e., by means of the
'java.protocol.handler.pkgs' system property.
URL.URL(String,String,int,String)
URLStreamHandler | createURLStreamHandler(String protocol) - Return the handler associated wit the given protocol, or null
if a default handler should be tried
|
void | install() - Request that this factory be used before the default factory for resolving
URL's.
|
void | registerHandler(String protocol, URLStreamHandler handler) - Register a handler for a new protocol.
|
MappedURLStreamHandlerFactory
public MappedURLStreamHandlerFactory()
createURLStreamHandler
public URLStreamHandler createURLStreamHandler(String protocol)
Return the handler associated wit the given protocol, or null
if a default handler should be tried
install
public void install()
Request that this factory be used before the default factory for resolving
URL's.
registerHandler
public void registerHandler(String protocol,
URLStreamHandler handler)
Register a handler for a new protocol.