| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| private static final Pattern | |
| private final int |
| Access | Constructor and Description |
|---|---|
| public | HostAndPort(String
The hostname. hostname, int The port, or port)-1 for "no port".Creates a new hostname and port combination. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. Indicates whether some other object is "equal to" this one. |
| public String | |
| public int | |
| public int | |
| public static HostAndPort | Returns: The parsedHostAndPort instance.The URI to extract from. u)Tries to extract hostname and port information from the given URI. |
| public String | |
| public URI | |
| public URI | |
| public URI | Returns: The URI.The scheme to use. scheme, String The raw authority field, or rawAuthority, String null.The raw path field, or rawPath, String null.The raw query field, or rawQuery, String null.The raw fragment field, or rawFragment)null.Returns a URI with this hostname and port, potentially using other URI parameters from the given set of parameters. |
| private static String |
| hostname | back to summary |
|---|---|
| private final String hostname | |
| PAT_HOST_AND_PORT | back to summary |
|---|---|
| private static final Pattern PAT_HOST_AND_PORT | |
| port | back to summary |
|---|---|
| private final int port | |
| HostAndPort | back to summary |
|---|---|
| public HostAndPort(String hostname, int port) Creates a new hostname and port combination.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getHostname | back to summary |
|---|---|
| public String getHostname() Returns the hostname.
| |
| getPort | back to summary |
|---|---|
| public int getPort() Returns the port, or
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| parseFrom | back to summary |
|---|---|
| public static HostAndPort parseFrom(URI u) throws SocketException Tries to extract hostname and port information from the given URI.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| toURI | back to summary |
|---|---|
| public URI toURI(String scheme) Returns a URI with this hostname and port. | |
| toURI | back to summary |
|---|---|
| public URI toURI(String scheme, URI template) Returns a URI with this hostname and port, potentially reusing other URI parameters from the given template URI (authority, path, query, fragment). | |
| toURI | back to summary |
|---|---|
| public URI toURI(String scheme, String rawAuthority, String rawPath, String rawQuery, String rawFragment) Returns a URI with this hostname and port, potentially using other URI parameters from the given set of parameters. | |
| urlEncode | back to summary |
|---|---|
| private static String urlEncode(String s) | |