Java Utililty Methods URL from

List of utility methods to do URL from

Description

The list of methods to do URL from are organized into topic(s).

Method

URLnewUrl(String href)
Creates a new URL and wraps the java.net.MalformedURLException around an IllegalArgumentException if one was thrown.
try {
    return new URL(href);
} catch (MalformedURLException e) {
    throw new IllegalArgumentException("Malformed URL: " + href, e);
URLnewURL(String location)
new URL
return newURI(location).toURL();
URLnewURL(String url)
new URL
try {
    return new URL(url);
} catch (Exception e) {
    return null;
URLnewURL(String url_name)
new URL
try {
    return new URL(url_name);
} catch (MalformedURLException e) {
    throw new RuntimeException("Malformed URL " + url_name, e);
URLnewUrl(String urlString)
new Url
return new URL(urlString);