dispatcher.setDownloader("http", URLHandlerRegistry.getHttp(realm, host, username, passwd));
URLHandler httpHandler = URLHandlerRegistry.getHttp(realm, host, username, passwd); dispatcher.setDownloader("http", httpHandler); dispatcher.setDownloader("https", httpHandler);
    private static void configureURLHandler(String realm, String host, String username, String passwd) {        URLHandlerDispatcher dispatcher = new URLHandlerDispatcher();        dispatcher.setDownloader("http", URLHandlerRegistry.getHttp(realm, host, username, passwd));        URLHandlerRegistry.setDefault(dispatcher);    }