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