依据相对url得到绝对url
根据相对url得到绝对urlpublic?static?String?makeAbsoluteURL(String?link,?String?innerURL)?{??????Str
根据相对url得到绝对url
public?static?String?makeAbsoluteURL(String?link,?String?innerURL)?{??????String?retString?=?"";??????try?{??????????URI?base?=?new?URI(link);//link对应当前页面地址??????????URI?abs?=?base.resolve(innerURL);//解析于上述网页的相对URL,得到绝对URI??????????URL?absURL?=?abs.toURL();//转成URL??????????retString?=?absURL.toString();??????}?catch?(Exception?e)?{??????????return?"";??????}??????return?retString;??}?