open a URL in the browser that was used to launch SPICE

@param urlstring string represntation of URL to be opened
@return true if this was successfull
548290
public static boolean showDocument(String urlstring){
		try{
			URL url = new URL(urlstring);

			return showDocument(url);
		} catch (MalformedURLException e){
			logger.warn("malformed URL {}", urlstring, e);
			return false;
		}
	}
132109
public String openNewWindow(final String url, final long timeoutSeconds) {
		String oldHandle = openNewWindow(timeoutSeconds);
		get(url);
		return oldHandle;
	}
77100
public static void browse(String url) {
    Preconditions.checkNotNull(url);
    // Ask user to open in their browser using copy-paste
    System.out.println("Please open the following address in your browser:");
    System.out.println("  " + url);
    // Attempt to open it in the browser
    try {
      if (Desktop.isDesktopSupported()) {
        Desktop desktop = Desktop.getDesktop();
        if (desktop.isSupported(Action.BROWSE)) {
          System.out.println("Attempting to open that address in the default browser now...");
          desktop.browse(URI.create(url));
        }
      }
    } catch (IOException e) {
      LOGGER.log(Level.WARNING, "Unable to open browser", e);
    } catch (InternalError e) {
      // A bug in a JRE can cause Desktop.isDesktopSupported() to throw an
      // InternalError rather than returning false. The error reads,
      // "Can't connect to X11 window server using ':0.0' as the value of the
      // DISPLAY variable." The exact error message may vary slightly.
      LOGGER.log(Level.WARNING, "Unable to open browser", e);
    }
  }
219038
public boolean acceptsURL(String url) {

        if (url == null) {
            return false;
        }

        return url.regionMatches(true, 0, DatabaseURL.S_URL_PREFIX, 0,
                                 DatabaseURL.S_URL_PREFIX.length());
    }
352095
private static Process openURLinWindowsOS(final String url) throws IOException
	{
		String cmd = null;
		cmd = WINDOWS_PATH + " " + WINDOWS_FLAG + " ";
		return Runtime.getRuntime().exec(cmd + url);
	}
320404
private boolean checkUrl(String url) {
        try {
            URI uri = new URI(url);
            return uri.isAbsolute();
        } catch (URISyntaxException e) {
            return false;
        }
    }
994929
public static boolean isOsgiBundleUrl(String str) {
        if (str == null) {
            throw new NullPointerException("Specified string can not be null!");
        }
        return str.startsWith("bundle") && str.contains("://");
    }
949750
public static boolean acceptsUrl(String url) {
    return (url != null) && (url.startsWith("jdbc:mariadb:")
        || (url.startsWith("jdbc:mysql:") && !url.contains(DISABLE_MYSQL_URL)));
  }
25247
public static URI urlToUri( String urlAsString ) throws URISyntaxException {

		URL url;
		try {
			url = new URL( urlAsString );

		} catch( Exception e ) {
			throw new URISyntaxException( urlAsString, "Invalid URL." );
		}

		return urlToUri( url );
	}
556091
public static boolean isHttp(String url) {
		if (url.length() < 7 || !url.startsWith("http")) {
			return false;
		}
		int i = 4; // "http"
		if (url.charAt(i) == 's') {
			i++;
		}
		return url.startsWith("://", i);
	}
1253212
public static Intent newOpenWebBrowserIntent(String url) {
        if (!url.startsWith("https://") && !url.startsWith("http://")) {
            url = "http://" + url;
        }
        Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
        return intent;
    }
1153946
private boolean acceptTargetUrl(String urlS) {
        // Whitelist has precedence. Only patterns on the white list are allowed
        if (whiteList != null) {
            return checkPattern(whiteList, urlS, true);
        }

        // Then blacklist: Everything on this list is forbidden
        if (blackList != null) {
            return checkPattern(blackList, urlS, false);
        }

        // If no list is configured, then everything is allowed
        return true;
    }
147383
@Override
	public void open() {
		String url = getUrl();
		if (url == null) {
			throw new IllegalPageObjectConfigurationException(String.format("%s.getUrl() must not return null.", this.getClass().getName()));
		}
		webDriver.get(url);
	}
1110269
public static String post(String urlString, Map<String, Object> paramMap) {
		return post(urlString, paramMap, HttpRequest.TIMEOUT_DEFAULT);
	}
643612
public static boolean showDocument(URL url) {
        return showDocumentViaDesktop(url)
            || showDocumentViaExec(url)
            || JavaWebStart.showViaWebStart(url);
    }
1367077
@SuppressWarnings("unchecked")
public static boolean  showDocument ( URL  url )
//
{
	if ( basicServiceObject == null )
	{
			System.out.println("basisServiceObject = null");
			return false;
	}

	try
	{
		Method  method = basicServiceClass.getMethod (
			"showDocument", new Class [ ] { URL.class } );

		Boolean  resultBoolean = ( Boolean )
			method.invoke ( basicServiceObject, new Object [ ] { url } );

		boolean success = resultBoolean.booleanValue ( );
		if ( ! success )
		System.out.println("invocation of method failed!");
		return success;
	}
	catch ( Exception  ex )
	{
		ex.printStackTrace ( );

		throw new RuntimeException ( ex.getMessage ( ) );
	}
}
1251991
public static function hasUrl($string, &$matches = array(), $ifAll = false) {
		return 0 < self::validateByRegExp('/http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/', $string, $matches, $ifAll);
	}