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

Method setScheme

Ports/CLDC11/src/java/net/URI.java:241–252  ·  view source on GitHub ↗
(String scheme)

Source from the content-addressed store, hash-verified

239 ///
240 /// - [http://en.wikipedia.org/wiki/Uniform_resource_name](http://en.wikipedia.org/wiki/Uniform_resource_name)
241 protected void setScheme(String scheme) throws URISyntaxException {
242 if ((this.scheme = scheme) == null) {
243 absolute = false;
244 } else {
245 if (isValidScheme(scheme) == false) {
246 throw new URISyntaxException(scheme, "Invalid scheme");
247 }
248 if (isSocketScheme(scheme) == true) {
249 querySeparator = SOCKET_QUERY_SEPARATOR;
250 }
251 }
252 }
253
254 /// Utility method - set the scheme specific part, ensuring valid format. If
255 /// encode=true, then some elements will be run through the encoder (path,

Callers 2

URIMethod · 0.95
parseURIMethod · 0.95

Calls 2

isValidSchemeMethod · 0.95
isSocketSchemeMethod · 0.95

Tested by

no test coverage detected