@Test public void getLocalHostname() { }
public static String getLocalHostname() { InetAddress address; String hostname; try { address = InetAddress.getLocalHost(); hostname = address.getHostName(); if (StringUtil.isEmpty(hostname)) { hostname = address.toString(); } } catch (UnknownHostException noIpAddrException) { hostname = LOCALHOST; } return hostname; }
NetworkUtil { public static String getLocalHostname() { InetAddress address; String hostname; try { address = InetAddress.getLocalHost(); hostname = address.getHostName(); if (StringUtil.isEmpty(hostname)) { hostname = address.toString(); } } catch (UnknownHostException noIpAddrException) { hostname = LOCALHOST; } return hostname; } }
NetworkUtil { public static String getLocalHostname() { InetAddress address; String hostname; try { address = InetAddress.getLocalHost(); hostname = address.getHostName(); if (StringUtil.isEmpty(hostname)) { hostname = address.toString(); } } catch (UnknownHostException noIpAddrException) { hostname = LOCALHOST; } return hostname; }  }
NetworkUtil { public static String getLocalHostname() { InetAddress address; String hostname; try { address = InetAddress.getLocalHost(); hostname = address.getHostName(); if (StringUtil.isEmpty(hostname)) { hostname = address.toString(); } } catch (UnknownHostException noIpAddrException) { hostname = LOCALHOST; } return hostname; }  static String getLocalHostname(); static String getLocalHostIp(); }
NetworkUtil { public static String getLocalHostname() { InetAddress address; String hostname; try { address = InetAddress.getLocalHost(); hostname = address.getHostName(); if (StringUtil.isEmpty(hostname)) { hostname = address.toString(); } } catch (UnknownHostException noIpAddrException) { hostname = LOCALHOST; } return hostname; }  static String getLocalHostname(); static String getLocalHostIp(); static final String LOCALHOST; static final String LOCALHOST_IPV6; }