public static String getHost ( String url ) { try { return new URL ( url ) . getHost ( ) . toLowerCase ( Locale . ROOT ) ; } catch ( MalformedURLException e ) { return null ; } }
Returns the lowercased hostname for the url or null if the url is not well formed .