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

Method setScheme

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

Utility method - set the scheme, ensuring valid format, and determining the query separator to use. @see http://en.wikipedia.org/wiki/Uniform_resource_name

(String scheme)

Source from the content-addressed store, hash-verified

266 * @see <a href="http://en.wikipedia.org/wiki/Uniform_resource_name">http://en.wikipedia.org/wiki/Uniform_resource_name</a>
267 */
268 protected void setScheme(String scheme) throws URISyntaxException {
269 if ((this.scheme = scheme) == null) {
270 absolute = false;
271 } else {
272 if (isValidScheme(scheme) == false) {
273 throw new URISyntaxException(scheme, "Invalid scheme");
274 }
275 if (isSocketScheme(scheme) == true) {
276 querySeparator = SOCKET_QUERY_SEPARATOR;
277 }
278 }
279 }
280
281 /**
282 * Utility method - set the scheme specific part, ensuring valid format. If

Callers 2

URIMethod · 0.95
parseURIMethod · 0.95

Calls 2

isValidSchemeMethod · 0.95
isSocketSchemeMethod · 0.95

Tested by

no test coverage detected