Java Path to URL getURL(String schema, String host, String path)

Here you can find the source of getURL(String schema, String host, String path)

Description

get URL

License

Open Source License

Parameter

Parameter Description
schema a parameter
host a parameter
path a parameter

Declaration

public static URL getURL(String schema, String host, String path) 

Method Source Code

//package com.java2s;

import java.net.MalformedURLException;
import java.net.URL;

public class Main {
    /**//from   w  w  w .j a  va  2 s  . c o  m
     * @param schema
     * @param host
     * @param path
     * @return
     */
    public static URL getURL(String schema, String host, String path) {
        URL url = null;
        try {
            url = new URL(schema, host, "/" + path);
        } catch (MalformedURLException e) {
        }
        return url;
    }
}

Related

  1. getUrl(String ip, String port, String servicePath, String serviceName, String... args)
  2. getURL(String path)
  3. getURL(String path)
  4. getURL(String path, URL context)
  5. getUrl(String pluginId, String relativePath)
  6. getUrl(URL base, String path)
  7. getUrlForLocalPath(String path)
  8. getURLFromClassPath(String source)
  9. getURLFromPath(String jarPath)