/** * Return a URI with a defined port number, if possible. Default port * numbers are used are used if the URI has no port number and a default * port is known for this scheme. */ public static URI withDefaultPort(URI uri) { return withDefaultPort(uri, null, -1); }
/** * Create a new URI from the string representation, using default port * numbers if the string does not specify any. The argument-supplied * (schema,port) mapping overrides any default mapping, */ public static URI createWithDefaultPort(String uri, String scheme, int port) throws URISyntaxException { return withDefaultPort(new URI(uri), scheme, port); }
/** * Create a new URI from the string representation, using default port * numbers if the string does not specify any. */ public static URI createWithDefaultPort(String uri) throws URISyntaxException { return withDefaultPort(new URI(uri)); } }