Package | Description |
---|---|
inet.ipaddr |
Base classes for IP addresses and generic addresses.
|
Modifier and Type | Method and Description |
---|---|
IPAddress |
HostName.toAddress()
If this represents an IP address, returns that address.
|
IPAddress[] |
HostName.toAllAddresses()
Similar to
HostName.toAddress() , however in the case where the host is resolved,
this method returns all resolved addresses rather than the primary resolved address. |
InetAddress |
HostName.toInetAddress()
Returns the InetAddress associated with this host.
|
void |
HostName.validate()
Validates that this string is a valid host name or IP address, and if not, throws an exception with a descriptive message indicating why it is not.
|