public class HostPort extends Object
Parse a string in the form "host:port", handling IPv4 an IPv6 hosts
Modifier and Type | Method and Description |
---|---|
String |
getHost()
Get the host.
|
int |
getPort()
Get the port.
|
int |
getPort(int defaultPort)
Get the port.
|
static String |
normalizeHost(String host)
Normalize IPv6 address as per https://www.ietf.org/rfc/rfc2732.txt
|
public HostPort(String authority) throws IllegalArgumentException
IllegalArgumentException
public String getHost()
public int getPort()
public int getPort(int defaultPort)
defaultPort,
- the default port to return if a port is not specifiedCopyright © 1995-2016 Webtide. All Rights Reserved.