protected void setURI ( ) { // set _uri StringBuffer buf = new StringBuffer ( ) ; // ^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))? if ( _scheme != null ) { buf . append ( _scheme ) ; buf . append ( ' ' ) ; } if ( _is_net_path ) { buf . append ( "//" ) ; if ( _authority != null ) { // has_authority buf . append ( _authority ) ; } } if ( _opaque != null && _is_opaque_part ) { buf . append ( _opaque ) ; } else if ( _path != null ) { // _is_hier_part or _is_relativeURI if ( _path . length != 0 ) { buf . append ( _path ) ; } } if ( _query != null ) { // has_query buf . append ( ' ' ) ; buf . append ( _query ) ; } // ignore the fragment identifier _uri = buf . toString ( ) . toCharArray ( ) ; hash = 0 ; }
Once it s parsed successfully set this URI .