class ZipPathHandler extends AbstractPathHandler {

    /**
     * Returns {@link #PRIORITY_SPECIALIZED} for all "jar:file:" or files that end in ".jar" or ".zip"
     */
    @Override
    public int getPriority(String root) {
        if (root == null) {
            return PRIORITY_NOT_APPLICABLE;
        }

        if (root.toLowerCase().endsWith(".zip") || root.toLowerCase().endsWith(".jar")) {
            return PRIORITY_SPECIALIZED;
        }

        if (root.startsWith("jar:") && root.endsWith("!/")) { //only can handle `jar:` urls for the entire jar
            return PRIORITY_SPECIALIZED;
        }

        return PRIORITY_NOT_APPLICABLE;
    }

    @Override
    public ResourceAccessor getResourceAccessor(String root) throws FileNotFoundException {<FILL_FUNCTION_BODY>}

    @Override
    public Resource getResource(String path) throws IOException {
        return new PathResource(path, Paths.get(path));
    }

    @Override
    public OutputStream createResource(String path) throws IOException {
        return Files.newOutputStream(Paths.get(path), StandardOpenOption.CREATE_NEW);
    }
}

        int startIndex = root.startsWith("jar:") ? 4 : 0;
        int endIndex = root.lastIndexOf('!');
        root = root.substring(startIndex, endIndex > 4 ? endIndex : root.length());

        if (root.matches("^\\w\\w+:.*")) {
            String[] paths = root.split("!");

            Path rootPath = Paths.get(URI.create(paths[0]));

            // check for embedded jar files
            if (paths.length > 1) {
                return new ZipResourceAccessor(rootPath, Arrays.copyOfRange(paths, 1, paths.length));
            }
            else {
                return new ZipResourceAccessor(rootPath);
            }
        }
        return new ZipResourceAccessor(new File(root));
    
<methods>public non-sealed void <init>() <variables>