class OpearFile implements Opear {

    static Result<String[]> validateUriHeaderValues(final @NotNull Manifest manifest,
                                                    final @NotNull Attributes.Name headerName) {

        final List<Result<String>> cpResult = Util.getManifestHeaderValues(manifest, headerName.toString())
                .stream()
                .map(result1(URI::new))
                .map(uriResult -> uriResult.flatMap(uri -> {
                    final String normal = uri.normalize().getPath().replaceFirst("^/", "");
                    if ("..".equals(normal) || normal.startsWith("../")) {
                        return Result.failure("Illegal parent path selector in " + normal);
                    } else {
                        return Result.success(normal);
                    }
                }))
                .collect(Collectors.toList());
        return cpResult.stream()
                .filter(Result::isFailure).findFirst()
                .map(failed ->
                        failed.getError()
                                .map(Result::<String[]>failure)
                                .orElseGet(() -> Result.<String[]>failure(format("invalid %s header", headerName))))
                .orElseGet(() -> Result.success(cpResult.stream().flatMap(Result::stream).toArray(String[]::new)));
    }

      OpearFile(final File cacheDir, final OpearMetadata metadata);

}