@Contract(threading=IMMUTABLE) public final class URIAuthority extends Object implements NamedEndpoint, Serializable
URI.| Constructor and Description |
|---|
URIAuthority(NamedEndpoint namedEndpoint) |
URIAuthority(String hostname) |
URIAuthority(String hostname,
int port) |
URIAuthority(String userInfo,
String hostname,
int port) |
| Modifier and Type | Method and Description |
|---|---|
static URIAuthority |
create(String s)
Creates
URIHost instance from string. |
boolean |
equals(Object obj) |
String |
getHostName()
Returns name (IP or DNS name).
|
int |
getPort()
Returns the port.
|
String |
getUserInfo() |
int |
hashCode() |
String |
toString() |
public URIAuthority(String userInfo, String hostname, int port)
IllegalArgumentException - If the port parameter is outside the specified range of valid port values, which is between 0 and
65535, inclusive. -1 indicates the scheme default port.public URIAuthority(String hostname, int port)
public URIAuthority(NamedEndpoint namedEndpoint)
public URIAuthority(String hostname)
public static URIAuthority create(String s) throws URISyntaxException
URIHost instance from string. Text may not contain any blanks.URISyntaxExceptionpublic String getUserInfo()
public String getHostName()
NamedEndpointgetHostName in interface NamedEndpointpublic int getPort()
NamedEndpointgetPort in interface NamedEndpoint-1 if not setCopyright © 2005–2021 The Apache Software Foundation. All rights reserved.