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());
}

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 ( ) ) ; }
translate a urlstring and a port definition to a url object
