code: public static String urlToScheme(final String url) {
  		for(final String scheme : ALL_SCHEMES) {
  			if(url.startsWith(scheme)) {
  				return scheme;
  			}
  		}
  		return null;
  	}
docs: Attempt to find the scheme (http://, https://, etc) from a given URL.
  @param url URL String to parse for a scheme.
  @return the scheme, including trailing "://" if known, null otherwise.