There are a number of frameworks that require to be able to "wrap" the JDK's built-in URLStreamHandler's. Such a method, as below or similar, could expose the built-in handler's to support this use-case.
URL.java:
/**
* Returns a URLStreamHandlerFactory capable of creating instances of the
* system's built-in URLStreamHandlers, for the given protocol.
*
* @param protocol the protocol
* @return the factory
*/
public static URLStreamHandlerFactory builtinStreamHandlerFactory(String protocol) {
return defaultFactory;
}
URL.java:
/**
* Returns a URLStreamHandlerFactory capable of creating instances of the
* system's built-in URLStreamHandlers, for the given protocol.
*
* @param protocol the protocol
* @return the factory
*/
public static URLStreamHandlerFactory builtinStreamHandlerFactory(String protocol) {
return defaultFactory;
}