Here you can find the source of getAbsoluteUrl(String base_url, String rel_url)
public static String getAbsoluteUrl(String base_url, String rel_url) throws MalformedURLException
//package com.java2s; //License from project: Open Source License import java.net.MalformedURLException; import java.net.URL; public class Main { public static String getAbsoluteUrl(String base_url, String rel_url) throws MalformedURLException { URL base = new URL(base_url); URL abs = new URL(base, rel_url); return abs.toString(); }//from w w w .ja v a 2 s.c om }