code: public static URL createURL(String protocol,
                                  String host,
                                  int port,
                                  String file) throws MalformedURLException {
          URLStreamHandlerFactory factory = _factories.get(protocol);
  
          // If there is no URLStreamHandlerFactory registered for the
          // scheme/protocol, then we just use the regular URL constructor.
          if (factory == null) {
              return new URL(protocol, host, port, file);
          }
  
          // If there is a URLStreamHandlerFactory associated for the
          // scheme/protocol, then we create a URLStreamHandler. And, then use
          // then use the URLStreamHandler to create a URL.
          URLStreamHandler handler = factory.createURLStreamHandler(protocol);
          return new URL(protocol, host, port, file, handler);
      }
docs: Creates a URL from the specified protocol name, host name, port number,
  and file name.
  <p/>
  No validation of the inputs is performed by this method.
  
  @param protocol the name of the protocol to use
  @param host     the name of the host
  @param port     the port number
  @param file     the file on the host
  @return URL created using specified protocol, host, and file
  @throws MalformedURLException if an unknown protocol is specified