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)
| 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 |
no test coverage detected