Returns the current port number, with a default if no port is defined.
(int defaultPort)
| 121 | |
| 122 | |
| 123 | public int getPortOrDefault(int defaultPort) { |
| 124 | return hasPort() ? port : defaultPort; |
| 125 | } |
| 126 | |
| 127 | /** |
| 128 | * Build a HostAndPort instance from separate host and port values. |