public static int getDefaultPort ( String protocol ) { if ( HTTP_PROTOCOL . equals ( protocol ) ) { return DEFAULT_HTTP_PORT ; } else if ( HTTPS_PROTOCOL . equals ( protocol ) ) { return DEFAULT_HTTPS_PORT ; } else { throw new IllegalArgumentException ( "No known default for " + protocol ) ; } }
Returns the default port for the specified protocol .