public final class HostUtils extends Object
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 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
UnknownHostException
public static String getLocalIp() throws UnknownHostException
UnknownHostException
Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.