public class NetworkUtils extends Object
| Constructor and Description |
|---|
NetworkUtils() |
| Modifier and Type | Method and Description |
|---|---|
static InetAddress |
firstLocalNonLoopbackIpv4Address()
Go through our network interfaces and find the first bound address for an
up interface that's in the IPv4 address space and is not the loopback
address.
|
static InetAddress |
getLocalHost()
Many Linux systems typically return 127.0.0.1 as the localhost address
instead of the address assigned on the local network.
|
public static InetAddress getLocalHost() throws UnknownHostException
UnknownHostException - If the host is considered unknown for any reason.public static InetAddress firstLocalNonLoopbackIpv4Address()
Copyright © 2009-2013 LittleShoot. All Rights Reserved.