Utility method to set the fragment. 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=fa
(String fragment, boolean encode)
| 420 | * @param encode |
| 421 | */ |
| 422 | protected void setFragment(String fragment, boolean encode) { |
| 423 | if ((this.fragment = fragment) != null && encode) { |
| 424 | this.fragment = URIHelper.encodeString(this.fragment); |
| 425 | } |
| 426 | } |
| 427 | |
| 428 | /** |
| 429 | * Utility method to construct the scheme specific part from the uri |
no test coverage detected