/** * Update the pah (encoded) of this MutableUri. * * @param rawPath new path element (encoded) * @throws URISyntaxException if the new equivalent URI is invalid */ public void setRawPath(String rawPath) throws URISyntaxException { uri = create( uri.getScheme(), uri.getRawUserInfo(), uri.getHost(), uri.getPort(), rawPath, uri.getRawQuery(), uri.getRawFragment()); setResourcePath(uri.getRawPath()); }
/** * Update the path (not encoded) of this MutableUri. * * @param path new path element (not encoded) * @throws URISyntaxException if the new equivalent URI is invalid */ public void setPath(final String path) throws URISyntaxException { this.uri = new URI( uri.getScheme(), uri.getUserInfo(), uri.getHost(), uri.getPort(), path, uri.getQuery(), uri.getFragment()); setResourcePath(uri.getPath()); }
/** * Builds a new MutableUri using the given URI. * * @param uri URI */ public MutableUri(final URI uri) { this.uri = uri; setResourcePath(uri.getRawPath()); }