Code example for URI

Methods: resolve

0
        URI base = new URI("http://host/a/b/c");
        assertEquals("http://another/d/e", base.resolve("//another/d/e").toString());
    } 
 
    public void testRelativeWithScheme() throws Exception { 
        URI base = new URI("http://host/a/b/c");
        try { 
            base.resolve("http:");
            fail();
        } catch (IllegalArgumentException expected) {
        } 
        assertEquals("http:/", base.resolve("http:/").toString());
    } 
 
    public void testMalformedUrlsRefusedByFirefoxAndChrome() throws Exception { 
        URI base = new URI("http://host/a/b/c");
        try { 
            base.resolve("http://");
            fail();
        } catch (IllegalArgumentException expected) {
Connect your IDE to all the code out there  Get Codota for Java