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

URLmakeUrl(String base, String suffix)
make Url
try {
    return new URL(pathCat(base, suffix));
} catch (MalformedURLException e) {
    throw new RuntimeException("Internal error", e);
URLmakeURL(String id)
make URL
try {
    String base = "http://share.findmespot.com/messageService/guestlinkservlet";
    String full = String.format("%s?glId=%s&completeXml=true", base, id);
    return new URL(full);
} catch (MalformedURLException mue) {
    throw new AssertionError(mue);
URLmakeURL(String location)
Obtains a URL from a string.
if (location == null || location.trim().length() == 0) {
    return null;
try {
    return new URL(location);
} catch (MalformedURLException e) {
    try {
        URI uri = new File(location).toURI();
...
URLmakeURL(String title, String urlString)
Creates a URL from user input.
if (urlString == null) {
    return null;
if (urlString.trim().length() < 1) {
    return null;
URL url = null;
int i = -1;
...
URLmakeUrl(String url)
make Url
try {
    return new URL(url);
} catch (MalformedURLException e) {
    throw new RuntimeException(e);
URLmakeUrl(String url)
Creates a URL instance.
try {
    return new URL(url);
} catch (MalformedURLException e) {
    throw new RuntimeException(e);
URLmakeURL(String url)
make URL
URL res = null;
if (url == null)
    return res;
try {
    res = new URL(url);
} catch (MalformedURLException e) {
    try {
        res = new URL("file", null, url);
...
URLmakeURL(String urlstr)
make URL
URL theURL = null;
try {
    theURL = new URL(ensureURLProtocol(urlstr));
} catch (MalformedURLException e) {
    e.printStackTrace();
} catch (Exception e) {
    e.printStackTrace();
return theURL;
URLmakeURL(String[] URLStrings)
make URL
for (String url : URLStrings) {
    try {
        return new URL(url);
    } catch (MalformedURLException e) {
return null;
URLnewURL(CharSequence urlString)
new URL
return newURL((URL) null, urlString);