@Test(expected = UnknownHostException.class) public void isLocalAddress_unknownHost() throws Exception { AddressUtils.isLocalAddress("SomeUnknownAddress"); }
public static boolean isLocalAddress(final String address) throws UnknownHostException { final InetAddress inetAddress = InetAddress.getByName(address); return inetAddress.isLinkLocalAddress() || inetAddress.isAnyLocalAddress() || inetAddress.isLoopbackAddress(); }
AddressUtils { public static boolean isLocalAddress(final String address) throws UnknownHostException { final InetAddress inetAddress = InetAddress.getByName(address); return inetAddress.isLinkLocalAddress() || inetAddress.isAnyLocalAddress() || inetAddress.isLoopbackAddress(); } }
AddressUtils { public static boolean isLocalAddress(final String address) throws UnknownHostException { final InetAddress inetAddress = InetAddress.getByName(address); return inetAddress.isLinkLocalAddress() || inetAddress.isAnyLocalAddress() || inetAddress.isLoopbackAddress(); }  }
AddressUtils { public static boolean isLocalAddress(final String address) throws UnknownHostException { final InetAddress inetAddress = InetAddress.getByName(address); return inetAddress.isLinkLocalAddress() || inetAddress.isAnyLocalAddress() || inetAddress.isLoopbackAddress(); }  static boolean isLocalAddress(final String address); static boolean isPublicAddress(final String address); }
AddressUtils { public static boolean isLocalAddress(final String address) throws UnknownHostException { final InetAddress inetAddress = InetAddress.getByName(address); return inetAddress.isLinkLocalAddress() || inetAddress.isAnyLocalAddress() || inetAddress.isLoopbackAddress(); }  static boolean isLocalAddress(final String address); static boolean isPublicAddress(final String address);  }