public static boolean startsWithHttpOrHttps(String uri){
  if (uri == null) {
    return false;
  }
  String lowercaseUri=uri.toLowerCase(Locale.US);
  return lowercaseUri.startsWith("http://") || lowercaseUri.startsWith("https://");
}

public static boolean startsWithHttpOrHttps ( String uri ) { if ( uri == null ) { return false ; } String lowercaseUri = uri . toLowerCase ( Locale . US ) ; return lowercaseUri . startsWith ( "http://" ) || lowercaseUri . startsWith ( "https://" ) ; }
returns true if the string starts with http : / / or https : / / .
