Serves the specified {@link URL} as a static resource.
173781
boolean serveStaticResource(HttpServletRequest req, StaplerResponse rsp, URL url, long expiration) throws IOException {
        return serveStaticResource(req,rsp,openURL(url),expiration);
    }
885512
public static ServiceDependencyBuilder serviceDependency(final String url) {
        return new ServiceDependencyBuilder()
                .withUrl(url)
                .withType(ServiceDependency.TYPE_SERVICE)
                .withSubtype(ServiceDependency.SUBTYPE_OTHER);
    }
806281
public void setUrl(String url) {
        if (url != null && url.trim().length() > 0) {
            if (Url.isUrl(url)) {
                this.url = url;
            } else {
                throw new IllegalArgumentException(url + " is not a valid URL.");
            }
        }
    }
1031506
public ParallelTaskBuilder prepareHttpGet(String url) {
        reinitIfClosed();
        ParallelTaskBuilder cb = new ParallelTaskBuilder();
        
        cb.getHttpMeta().setHttpMethod(HttpMethod.GET);
        cb.getHttpMeta().setRequestUrlPostfix(url);
        
        return cb;
    }
504766
private static URL toURL(String url, int port) throws MalformedURLException {
	URL u = HTTPUtil.toURL(url, true);
	if (port == -1) return u;
	return new URL(u.getProtocol(), u.getHost(), port, u.getFile());
    }
429202
public static void loadPropertiesFromURL(URL url) {
        if (url == null) {
            return;
        }
        InputStream in = null;
        try {
            in = url.openStream();
            properties.load(in);
        } catch (IOException e) {
            AnalysisContext.logError("Unable to load properties from " + url, e);
        } finally {
            IO.close(in);
        }
    }
758047
public static Response get(String url) throws URISyntaxException, HttpException {
        return send(new HttpGet(url), null, null);
    }
788056
public static URL getUrl(String url) {
    try {
      return new URL(url);
    } catch (MalformedURLException e) {
      throw new RuntimeException(e);
    }
  }
1161651
protected void processUrl(final String url) {
        try {
            final Result result = mProcessor.processUrl(url);
            post(new Runnable() {
                @Override
                public void run() {
                    if (isAttachedToWindow()) {
                        postProcessUrl(url, result);
                    }
                }
            });
        } catch (Throwable ex) {
            if (LOGGING) {
                Log.wtf(LOG_TAG, ex);
            }
        }
    }
1117601
public static URL correct(final URL url) throws MalformedURLException {
        if (url == null) {
            throw new MalformedURLException("The url is null");
        }
        return new URL(correct(url.toString(), false));
    }
1007939
public void setURL(String url) {
		try {
			this.value = (url != null) ? new URL(url) : null;
		} catch (Throwable exception) {
			this.value = null;
		}
		this.type = AttributeType.URL;
		this.assigned = this.value != null;
	}
383385
protected static String cleanupUrl(final String url) {
        if (url == null) {
            return null;
        }
        val jsessionPosition = url.indexOf(";jsession");
        if (jsessionPosition == -1) {
            return url;
        }
        val questionMarkPosition = url.indexOf('?');
        if (questionMarkPosition < jsessionPosition) {
            return url.substring(0, url.indexOf(";jsession"));
        }
        return url.substring(0, jsessionPosition) + url.substring(questionMarkPosition);
    }
343435
public ParallelTaskBuilder prepareHttpPut(String url) {
        reinitIfClosed();
        ParallelTaskBuilder cb = new ParallelTaskBuilder();
        cb.getHttpMeta().setHttpMethod(HttpMethod.PUT);
        cb.getHttpMeta().setRequestUrlPostfix(url);
        return cb;

    }
56241
public void setUrl(final String url) {
		String currUrl = getUrl();

		if (!Objects.equals(url, currUrl)) {
			getOrCreateComponentModel().url = url;
		}
	}
1227326
public ParallelTaskBuilder prepareHttpHead(String url) {
        reinitIfClosed();
        ParallelTaskBuilder cb = new ParallelTaskBuilder();
        cb.getHttpMeta().setHttpMethod(HttpMethod.HEAD);
        cb.getHttpMeta().setRequestUrlPostfix(url);
        return cb;
    }
653596
public static URL asUrlOrResource(String s) {
        if (Strings.isNullOrEmpty(s)) {
            return null;
        }

        try {
            return new URL(s);
        } catch (MalformedURLException e) {
            //If its not a valid URL try to treat it as a local resource.
            return findConfigResource(s);
        }
    }
347179
public static InputStream getStream(URL url) {
		Assert.notNull(url);
		try {
			return url.openStream();
		} catch (IOException e) {
			throw new IORuntimeException(e);
		}
	}