public UriBuilder setPath ( final String str ) { final String [ ] parts ; if ( str . startsWith ( "/" ) ) { parts = new String [ ] { str } ; } else { final String base = getPath ( ) . toString ( ) ; parts = new String [ ] { base , base . endsWith ( "/" ) ? "" : "/" , str } ; } return setPath ( new GStringImpl ( EMPTY , parts ) ) ; }
Sets the path part of the URI .