@Test public void testToAbsolute_String_String() { logger.info("toAbsolute"); String base = "http: String relative = "../path2/doc2?a=1&b=2#part2"; String expResult = "http: String result = URLParser.toAbsolute(base, relative); assertEquals(expResult, result); }
public static URL toAbsolute(URL baseURL, String relative) { try { return new URL(baseURL, relative); } catch (MalformedURLException ex) { throw new RuntimeException(ex); } }
URLParser { public static URL toAbsolute(URL baseURL, String relative) { try { return new URL(baseURL, relative); } catch (MalformedURLException ex) { throw new RuntimeException(ex); } } }
URLParser { public static URL toAbsolute(URL baseURL, String relative) { try { return new URL(baseURL, relative); } catch (MalformedURLException ex) { throw new RuntimeException(ex); } }  }
URLParser { public static URL toAbsolute(URL baseURL, String relative) { try { return new URL(baseURL, relative); } catch (MalformedURLException ex) { throw new RuntimeException(ex); } }  static URL toAbsolute(URL baseURL, String relative); static String toAbsolute(String base, String relative); static Map<URLParts, String> splitURL(String URLString); static Map<URLParts, String> splitURL(URL url); static String joinURL(Map<URLParts, String> urlParts); static Map<DomainParts, String> splitDomain(String domain); }
URLParser { public static URL toAbsolute(URL baseURL, String relative) { try { return new URL(baseURL, relative); } catch (MalformedURLException ex) { throw new RuntimeException(ex); } }  static URL toAbsolute(URL baseURL, String relative); static String toAbsolute(String base, String relative); static Map<URLParts, String> splitURL(String URLString); static Map<URLParts, String> splitURL(URL url); static String joinURL(Map<URLParts, String> urlParts); static Map<DomainParts, String> splitDomain(String domain);  }