code: private URI buildURI(String path) throws URISyntaxException
     {
        try
        {
           return new URI(path);
        }
        catch (URISyntaxException e)
        {
           return new URI(TextUtil.escape(path, '%', true));
        }
     }
docs: Build URI from string.