public static URI setPath ( final URI orig , final String path ) { try { return new URI ( orig . getScheme ( ) , orig . getUserInfo ( ) , orig . getHost ( ) , orig . getPort ( ) , path , orig . getQuery ( ) , orig . getFragment ( ) ) ; } catch ( final URISyntaxException e ) { throw new RuntimeException ( e . getMessage ( ) , e ) ; } }
Create new URI with a given path .