code: public static boolean hasScheme(String possibleUrl) {
          boolean result = false;
          for (int i = 0; i < possibleUrl.length(); i++) {
              char c = possibleUrl.charAt(i);
              if (c == ':') {
                  if (i != 0) {
                      result = true;
                  }
                  break;
              }
              if (!scheme.get(c)) {
                  break;
              }
          }
          return result;
      }
docs: Test if passed String has likely URI scheme prefix.
  @param possibleUrl URL string to examine.
  @return True if passed string looks like it could be an URL.