public class InetAddressFactory
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.net.InetAddress |
newFromHostString(java.lang.String host)
Creates an
InetAddress with both an IP and a host set so that no
further resolving will take place. |
static java.net.InetAddress |
newLoopback() |
static java.net.InetAddress |
newNonLoopback() |
public static java.net.InetAddress newNonLoopback()
public static java.net.InetAddress newFromHostString(java.lang.String host)
InetAddress with both an IP and a host set so that no
further resolving will take place.
If an IP address string is specified, this method ensures that it will be
used in place of a host name.
If a host name other than Address.LOCALHOST is specified, this
method trys to find a non-loopback IP associated with the supplied host
name.
If the specified host name is Address.LOCALHOST, this method
returns a loopback address.host - InetAddress with both an IP and a host set (no further
resolving will take place)public static java.net.InetAddress newLoopback()