public class GenericURLStreamHandlerFactory extends Object implements URLStreamHandlerFactory
Modifier and Type | Method and Description |
---|---|
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 . |
public final URLStreamHandler setHandler(String protocol, URLStreamHandler handler)
handler
for protocol
.handler
, or null if none was set.public final URLStreamHandler getHandler(String protocol)
protocol
handler previously set via setHandler(String, URLStreamHandler)
,
or null if none was set.public final URLStreamHandler createURLStreamHandler(String protocol)
createURLStreamHandler
in interface URLStreamHandlerFactory
public static GenericURLStreamHandlerFactory register()
Registration is only performed once.