Code example for URI

Methods: resolve

0
        assertEquals(true, uri.isOpaque());
        assertEquals(true, uri.isAbsolute());
    } 
 
    public void testRfc1808AbnormalExampleQueryOrFragmentDots() throws Exception { 
        URI base = new URI("http://a/b/c/d;p?q");
        assertEquals("http://a/b/c/g?y/./x", base.resolve("g?y/./x").toString());
        assertEquals("http://a/b/c/g?y/../x", base.resolve("g?y/../x").toString());
        assertEquals("http://a/b/c/g#s/./x", base.resolve("g#s/./x").toString());
        assertEquals("http://a/b/c/g#s/../x", base.resolve("g#s/../x").toString());
    } 
 
    public void testSquareBracketsInUserInfo() throws Exception { 
        try { 
            new URI("http://user:[::1]@host");
            fail();
        } catch (URISyntaxException expected) {
        } 
    } 
 
    public void testFileUriExtraLeadingSlashes() throws Exception {