MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / setPath

Method setPath

vm/JavaAPI/src/java/net/URI.java:366–375  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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,

Callers 3

URIMethod · 0.95
executeImpl_oldMethod · 0.45

Calls 2

encodeStringMethod · 0.95
decodeStringMethod · 0.95

Tested by

no test coverage detected