code: @SuppressWarnings("PMD.AssignmentInOperand")
      public Optional<String> pathRemainder(URI resource) {
          int matchRes = matches(resource);
          if (matchRes < 0) {
              return Optional.empty();
          }
          int segments = matchRes + 1;
          StringBuilder suffix = new StringBuilder();
          int[] count = { 0 };
          PathSpliterator.stream(resource.getPath()).forEach(seg -> {
              if (count[0]++ >= segments) {
                  if (count[0] > segments + 1) {
                      suffix.append('/');
                  }
                  suffix.append(seg);
              }
          });
          return Optional.of(suffix.toString());
      }
docs: If the URI matches, returns the path without prefix as specified
  by the matched pattern (see {@link #split(String, int)}).
  
  @param resource the resource
  @return the result.