code: public String getHost() {
  	String host = Util.getLocalHostAddress();
  	try {
  	    URL u = new URL("http", host, 80, "/");
  	    return u.getHost();
  	} catch (MalformedURLException e) {
  	    return host;
  	}
      }
docs: Returns hostname of this server. The format of the host conforms
  to RFC 2732, i.e. for a literal IPv6 address, this method will
  return the IPv6 address enclosed in square brackets ('[' and ']').
  
  @return hostname