Java Utililty Methods URI to Port

List of utility methods to do URI to Port

Description

The list of methods to do URI to Port are organized into topic(s).

Method

intgetPort(URI uri)
get Port
if (uri.getPort() != -1) {
    return uri.getPort();
if ("https".equals(uri.getScheme())) {
    return 443;
return 80;
intgetPort(URI uri)
get Port
int port = uri.getPort();
if (port == -1) {
    if ("https".equals(uri.getScheme()))
        port = 443;
    else
        port = 80;
return port;
...
intgetPortFromURI(final URI uri)
Get the port from the URI in iRODS form.
return uri.getPort();