Class NetworkUtil
- java.lang.Object
-
- org.apache.uima.adapter.vinci.util.NetworkUtil
-
public class NetworkUtil extends Object
Network utilities.
-
-
Constructor Summary
Constructors Constructor Description NetworkUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static InetAddress
getLocalHostAddress()
Gets the InetAddress of the localhost.
-
-
-
Method Detail
-
getLocalHostAddress
public static InetAddress getLocalHostAddress() throws UnknownHostException
Gets the InetAddress of the localhost. Attempts to get a non-loopback address (i.e. not 127.0.0.1) if at all possible. This utility is better than InetAddress.getLocalHost() since the latter often fails on Linux.- Returns:
- the InetAddress of the localhost. This will be a non-loopback address if one could be found.
- Throws:
UnknownHostException
- if the local host address could not be obtained
-
-