code: public static URI concatPath(URI base, String relPath) {
          String resultPath = base.getPath() + StringUtils.stripStart(relPath, "/");
          try {
              return new URI(base.getScheme(), base.getUserInfo(), base.getHost(), base.getPort(), resultPath, null, null);
          } catch (URISyntaxException e) {
              throw new InvalidUriException(e);
          }
      }
docs: Concatenates 2 {@link URI} by taking the beginning of the first (up to the path) and the end of the other
  (starting from the path). While concatenating, checks that there is no doubled "/" character between the path
  fragments.
  
  @param base
  the base uri
  @param relPath
  the path to concatenate with the base uri
  @return the concatenated uri