@ThreadSafe
public final class URLHandlerFactory
extends Object
implements URLStreamHandlerFactory
Allows the registration of URL handlers.
Note: the first invocation of the register(java.lang.String, java.net.URLStreamHandler) method will fail with
an Error if an other URLStreamHandlerFactory was already
established via URL.setURLStreamHandlerFactory(java.net.URLStreamHandlerFactory).
| Modifier and Type | Method and Description |
|---|---|
URLStreamHandler |
createURLStreamHandler(String protocol) |
static void |
register(String protocol,
URLStreamHandler handler)
Registers a URL protocol handler.
|
public static void register(@Nonnull
String protocol,
@Nonnull
URLStreamHandler handler)
protocol - The protocol name.handler - The protocol handler.public URLStreamHandler createURLStreamHandler(String protocol)
createURLStreamHandler in interface URLStreamHandlerFactoryCopyright © 2003-2019 Serge Brisson. All Rights Reserved.