IpUtils { public static InetAddress getFistNonLocalIpv4ServerAddress() { FoundationService.DEFAULT.getLocalIp(); return getFistNonLocalIpv4ServerAddress("10"); }  static String getIp(SocketAddress socketAddress); static boolean isValidIpFormat(String ip); static boolean isPort(String str); static InetAddress getFistNonLocalIpv4ServerAddress(); static InetAddress getFistNonLocalIpv4ServerAddress(String ipPrefixPrefer); static boolean isLocal(String host); static List<HostPort> parseAsHostPorts(String addressDesc); static List<InetSocketAddress> parse(String addressDesc); static InetSocketAddress parseSingle(String singleAddress); static Pair<String, Integer> parseSingleAsPair(String singleAddress); static String[] splitIpAddr(String ip);  }
@Test public void testGetFistNonLocalServerAddress(){ logger.info("addr:{}", IpUtils.getFistNonLocalIpv4ServerAddress()); logger.info("hostaddress:{}", IpUtils.getFistNonLocalIpv4ServerAddress().getHostAddress()); }