Class UrlFactory

    • Method Detail

      • getUrl

        public static URL getUrl​(String urlStr,
                                 Request request)
                          throws MalformedURLException
        Gets the URL Object.

        This method has been created because it is not possible to call URL.setURLStreamHandlerFactory more than once.

        Parameters:
        urlStr - the URL String
        request - the request
        Returns:
        the URL Object
        Throws:
        MalformedURLException - the malformed URL exception
      • disconnect

        public static void disconnect​(URLConnection connection)
        Disconnect.
        Parameters:
        connection - the URL connection