public static boolean isHttp(String url){
  return url != null && url.length() > 4 && url.startsWith("http") && url.charAt(4) != 's';
}

public static boolean isHttp ( String url ) { return url != null && url . length ( ) > 4 && url . startsWith ( "http" ) && url . charAt ( 4 ) != 's' ; }
checks if the given url string starts with http : / / or https : / /
