public static boolean isHttp(String scheme){
  return scheme.equalsIgnoreCase("http") || scheme.equalsIgnoreCase("https");
}

public static boolean isHttp ( String scheme ) { return scheme . equalsIgnoreCase ( "http" ) || scheme . equalsIgnoreCase ( "https" ) ; }
adjust if the scheme is http or https
