com.jogamp.common.net
Class GenericURLStreamHandlerFactory

java.lang.Object
  extended by com.jogamp.common.net.GenericURLStreamHandlerFactory
All Implemented Interfaces:
URLStreamHandlerFactory

public class GenericURLStreamHandlerFactory
extends Object
implements URLStreamHandlerFactory


Method Summary
 URLStreamHandler createURLStreamHandler(String protocol)
           
 URLStreamHandler getHandler(String protocol)
          Returns the protocol handler previously set via setHandler(String, URLStreamHandler), or null if none was set.
static GenericURLStreamHandlerFactory register()
          Returns the singleton instance of the registered GenericURLStreamHandlerFactory or null if registration was not successful.
 URLStreamHandler setHandler(String protocol, URLStreamHandler handler)
          Sets the handler for protocol.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setHandler

public final URLStreamHandler setHandler(String protocol,
                                         URLStreamHandler handler)
Sets the handler for protocol.

Returns:
the previous set handler, or null if none was set.

getHandler

public final URLStreamHandler getHandler(String protocol)
Returns the protocol handler previously set via setHandler(String, URLStreamHandler), or null if none was set.


createURLStreamHandler

public final URLStreamHandler createURLStreamHandler(String protocol)
Specified by:
createURLStreamHandler in interface URLStreamHandlerFactory

register

public static GenericURLStreamHandlerFactory register()
Returns the singleton instance of the registered GenericURLStreamHandlerFactory or null if registration was not successful.

Registration is only performed once.