|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.littleshoot.proxy.NetworkUtils
public class NetworkUtils
Network utilities methods.
| Constructor Summary | |
|---|---|
NetworkUtils()
|
|
| Method Summary | |
|---|---|
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. |
static Collection<InetAddress> |
getNetworkInterfaces()
Utility method for accessing public interfaces. |
static boolean |
isPublicAddress()
Returns whether or not this host is on the public Internet. |
static boolean |
isPublicAddress(InetAddress ia)
Returns whether or not the specified address represents an address on the public Internet. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NetworkUtils()
| Method Detail |
|---|
public static InetAddress getLocalHost()
throws UnknownHostException
UnknownHostException - If the host is considered unknown for
any reason.public static boolean isPublicAddress(InetAddress ia)
ia - The address to check.
true if the address is an address on the public
Internet, otherwise false.public static boolean isPublicAddress()
true if this host is on the public Internet,
otherwise false.
public static Collection<InetAddress> getNetworkInterfaces()
throws SocketException
Collection of public interfaces.
SocketException - If there's a socket error accessing the
interfaces.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||