560561562563564565566567568569570
URI uri; try { uri = method.getURI(); } catch (URIException uriException) { throw new InvalidURIException ( "Unable to get the escaped URI for the method " + method, uriException); } return uri.getEscapedURI();
9899100101102103104105106107
URIBuilder builder; try { builder = new URIBuilder(uri); } catch (URISyntaxException uriSyntaxException) { throw new InvalidURIException( "The uri '" + uri + "' is invalid.", uriSyntaxException); } return builder; }
557558559560561562563564565566567
URI uri; try { uri = uriBuilder.build(); } catch (URISyntaxException uriSyntaxException) { throw new InvalidURIException( "The uri is invalid.", uriSyntaxException); } String escapedURI = uri.toASCIIString();