protected void parseURI(String uriString) throws URISyntaxException {
  String s=uriString;
  int index=s.indexOf(FRAGMENT_SEPARATOR);
  if (index != -1) {
    setFragment(s.substring(index + 1),false);
    s=s.substring(0,index);
  }
  index=s.indexOf(SCHEME_SEPARATOR);
  if (index != -1) {
    String scheme=s.substring(0,index);
    if (isValidScheme(scheme)) {
      setScheme(scheme);
      s=s.substring(index + 1);
    }
  }
  parseSchemeSpecificPart(s,false);
}

protected void parseURI ( String uriString ) throws URISyntaxException { String s = uriString ; int index = s . indexOf ( FRAGMENT_SEPARATOR ) ; if ( index != - 1 ) { setFragment ( s . substring ( index + 1 ) , false ) ; s = s . substring ( 0 , index ) ; } index = s . indexOf ( SCHEME_SEPARATOR ) ; if ( index != - 1 ) { String scheme = s . substring ( 0 , index ) ; if ( isValidScheme ( scheme ) ) { setScheme ( scheme ) ; s = s . substring ( index + 1 ) ; } } parseSchemeSpecificPart ( s , false ) ; }
rather than attempting to process the uri string in a linear fashion , this implementation works its way from outside - in
