private Set<String> getAllLocalHostIP() throws UnknownHostException
{
Set<String> result = new HashSet<String>();
InetAddress addr = InetAddress.getLocalHost();
String hostName = addr.getHostName();
if (hostName.length() > 0)
{
InetAddress[] addrs = InetAddress.getAllByName(hostName);
if (addrs.length > 0)
{
for (int i = 0; i < addrs.length; i++)
{
result.add(addrs[i].getHostAddress());
}
}
}
result.add("127.0.0.1");
return result;
}