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

Method setQuery

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

Utility method to set the query. 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 query, boolean encode)

Source from the content-addressed store, hash-verified

342 * @throws URISyntaxException
343 */
344 protected void setQuery(String query, boolean encode) throws URISyntaxException {
345 if ((this.query = query) != null) {
346 if (encode) {
347 this.query = URIHelper.encodeString(this.query);
348 } else {
349 // validate
350 URIHelper.decodeString(this.query);
351 }
352 }
353 }
354
355 /**
356 * Utility method to set the path. If parameter encode=true, then the result

Callers 2

URIMethod · 0.95

Calls 2

encodeStringMethod · 0.95
decodeStringMethod · 0.95

Tested by

no test coverage detected