public class UrlStreamHandlerRegistry extends Object implements URLStreamHandlerFactory
| Constructor and Description |
|---|
UrlStreamHandlerRegistry() |
| Modifier and Type | Method and Description |
|---|---|
URLStreamHandler |
createURLStreamHandler(String scheme)
Get or Create a URLStreamHandler for a scheme.
|
UrlStreamHandlerRegistry |
factory(URLStreamHandlerFactory urlStreamHandlerFactory)
Register a URLStreamHandlerFactory
|
void |
providers()
Register all URLStreamHandlerFactory found in META-INF/services/java.net.URLStreamHandlerFactory files.
|
static UrlStreamHandlerRegistry |
register()
Get the singleton instance of the registry/factory.
|
public static UrlStreamHandlerRegistry register()
providers() on first call to this method.public void providers()
public UrlStreamHandlerRegistry factory(URLStreamHandlerFactory urlStreamHandlerFactory)
urlStreamHandlerFactory - A factory instance to register. The factory must produce thread-safe URLStreamHandlers.public URLStreamHandler createURLStreamHandler(String scheme)
createURLStreamHandler in interface URLStreamHandlerFactoryscheme - The scheme for the URLStreamHandlerCopyright © 2017. All rights reserved.