Utility method to set the path. If parameter encode=true, then the result will be encoded, otherwise the result will be validated to ensure encoding is valid. Typically the multi-parameter constructors will call this method with encode=true, and the single parameter construct will pass encode=false.
(String path, boolean encode)
| 364 | * @throws URISyntaxException |
| 365 | */ |
| 366 | protected void setPath(String path, boolean encode) throws URISyntaxException { |
| 367 | if ((this.path = path) != null) { |
| 368 | if (encode) { |
| 369 | this.path = URIHelper.encodeString(this.path); |
| 370 | } else { |
| 371 | // validate |
| 372 | URIHelper.decodeString(this.path); |
| 373 | } |
| 374 | } |
| 375 | } |
| 376 | |
| 377 | /** |
| 378 | * Utility method to construct the authority segment from given host, port, |
no test coverage detected