code: private static URL toURL(String url, int port) throws MalformedURLException {
  	URL u = HTTPUtil.toURL(url, true);
  	if (port == -1) return u;
  	return new URL(u.getProtocol(), u.getHost(), port, u.getFile());
      }
docs: translate a urlString and a port definition to a URL Object
  
  @param url URL String
  @param port URL Port Definition
  @return returns a URL Object
  @throws MalformedURLException