Here you can find the source of buildUrl(final String domain, final String path)
Parameter | Description |
---|---|
domain | the domain |
path | the path |
private static URL buildUrl(final String domain, final String path)
//package com.java2s; //License from project: Open Source License import java.net.MalformedURLException; import java.net.URL; public class Main { /**//from ww w . j a v a 2 s . c o m * Builds an {@link URL} given a domain and a path. * * @param domain the domain * @param path the path * @return the {@link URL} */ private static URL buildUrl(final String domain, final String path) { try { return new URL(new URL(domain), path); } catch (MalformedURLException e) { throw new RuntimeException(e); } } }