public class HostUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
PREFERED_ADDRESS_PROPERTY_NAME |
| Modifier and Type | Method and Description |
|---|---|
static Set<InetAddress> |
getAddresses()
Returns a
Set of InetAddress that are non-loopback or mac. |
static String |
getLocalHostName()
Returns the local hostname.
|
static String |
getLocalIp()
Returns the local IP.
|
static Map<String,Set<InetAddress>> |
getNetworkInterfaceAddresses()
|
public static final String PREFERED_ADDRESS_PROPERTY_NAME
public static Map<String,Set<InetAddress>> getNetworkInterfaceAddresses()
public static Set<InetAddress> getAddresses()
Set of InetAddress that are non-loopback or mac.public static String getLocalHostName() throws UnknownHostException
UnknownHostExceptionpublic static String getLocalIp() throws UnknownHostException
UnknownHostExceptionCopyright © 2011–2014 Red Hat. All rights reserved.