code: public static String getHostFromURL(String url) {
  		URL u = toURL(url);
  		String host = (u == null) ? "" : u.getHost();
  		return host;
  	}
docs: Returns the host part of the URL.
  @param url a URL
  @return just the host