public static boolean isUrlString(String s){
  return s.startsWith("http:/") || s.startsWith("ftp:/") || s.startsWith("file:/");
}

public static boolean isUrlString ( String s ) { return s . startsWith ( "http:/" ) || s . startsWith ( "ftp:/" ) || s . startsWith ( "file:/" ) ; }
indicates if a given string is a url string . checks to see if the string begins with the " http : / " , " ftp : / " , or " file : / " protocol strings .
