code: public Optional<String[]> splitPath(URI resource) {
          int matchRes = matches(resource);
          if (matchRes < 0) {
              return Optional.empty();
          }
          return Optional.of(split(resource.getPath(), matchRes + 1));
      }
docs: If the URI matches, returns the path split according to
  the matched pattern (see {@link #split(String, int)}).
  
  @param resource the resource
  @return the result.