@Contract(threading=IMMUTABLE) public final class URIAuthority extends Object implements NamedEndpoint, Serializable
URI
.Constructor and Description |
---|
URIAuthority(Host host) |
URIAuthority(NamedEndpoint namedEndpoint) |
URIAuthority(String hostname) |
URIAuthority(String userInfo,
Host host) |
URIAuthority(String hostname,
int port) |
URIAuthority(String userInfo,
NamedEndpoint endpoint) |
URIAuthority(String userInfo,
String hostname,
int port)
Constructs a new instance.
|
Modifier and Type | Method and Description |
---|---|
static URIAuthority |
create(String s)
Creates a
URIAuthority instance from a 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(Host host)
public URIAuthority(String userInfo, NamedEndpoint endpoint)
public URIAuthority(NamedEndpoint namedEndpoint)
public URIAuthority(String hostname)
public static URIAuthority create(String s) throws URISyntaxException
URIAuthority
instance from a string. Text may not contain any blanks.s
- The value to parseURISyntaxException
- Thrown if a string could not be parsed as a URIAuthority.public String getUserInfo()
public String getHostName()
NamedEndpoint
getHostName
in interface NamedEndpoint
public int getPort()
NamedEndpoint
getPort
in interface NamedEndpoint
-1
if not setCopyright © 2005–2021 The Apache Software Foundation. All rights reserved.