Code example for URI

Methods: toString

0
    } 
 
    public void testEscape() { 
        try { 
            URL url = new URL("http://example.com?query=one or more words");
            URI uri = new URI(
                    "http", 
                    "example.com", 
                    "/", 
                    "query=one or more words&fred=wilma's husband", 
                    null); 
            String out = uri.toString();
            LOG.fine("ok");
        } catch (Exception e) {
            fail("Can't form URL: " + e.getMessage());
        } 
    } 
}