public static boolean isAuthority ( String authString ) { Matcher m = AUTHORITY_REGEX . matcher ( authString ) ; return ( m != null ) && m . matches ( ) ; }
Tests if the String argument looks like it could be a legitimate authority fragment of a URL that is is it an IP address or are the characters legal in an authority and does the string end with a legal TLD .