@Override
    public boolean isReadable() {
        try {
            URL url = getURL();
            if (ResourceUtils.isFileURL(url)) {
                // Proceed with file system resolution...
                File file = getFile();
                return (file.canRead() && !file.isDirectory());
            } else {
                return true;
            }
        } catch (IOException ex) {
            return false;
        }
    }
This implementation determines the underlying File
(or jar file, in case of a resource in a jar/zip).
src/main/java/spark/resource/AbstractFileResolvingResource.java