class AliasedDirectoryResource implements Resource {

    @Override
    public URL getResource(String location) {
        URL result = null;
        if (location.startsWith(alias)) {
            location = location.substring(alias.length());
            File file = new File(rootDirectory, location);
            if (file.exists()) {
                try {
                    result = file.toURI().toURL();
                } catch (MalformedURLException exception) {
                }
            }
        }
        return result;
    }

    public  AliasedDirectoryResource();
    public  AliasedDirectoryResource(File rootDirectory, String alias);

}