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

Method parseURI

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

Rather than attempting to process the uri string in a linear fashion, this implementation works its way from outside-in @param uriString @throws URISyntaxException

(String uriString)

Source from the content-addressed store, hash-verified

491 * @throws URISyntaxException
492 */
493 protected void parseURI(String uriString) throws URISyntaxException {
494 String s = uriString;
495 int index = s.indexOf(FRAGMENT_SEPARATOR);
496 if (index != -1) {
497 setFragment(s.substring(index + 1), false);
498 s = s.substring(0, index);
499 }
500 index = s.indexOf(SCHEME_SEPARATOR);
501 if (index != -1) {
502 String scheme = s.substring(0, index);
503 if (isValidScheme(scheme)) {
504 setScheme(scheme);
505 s = s.substring(index + 1);
506 }
507 }
508 parseSchemeSpecificPart(s, false);
509 }
510
511 /**
512 * Utility method used to parse a given scheme specific part. If parameter

Callers 1

URIMethod · 0.95

Calls 6

indexOfMethod · 0.95
setFragmentMethod · 0.95
substringMethod · 0.95
isValidSchemeMethod · 0.95
setSchemeMethod · 0.95

Tested by

no test coverage detected