class DirectoryResource implements Resource {

    @Override
    public URL getResource(String location) {
        URL result = null;

        if (location != null) {
            File file = new File(rootDirectory, location);
            if (file.exists()) {
                try {
                    result = new URL(file.toURI().toString());
                } catch (MalformedURLException exception) {
                }
            }
        }

        return result;
    }

    public  DirectoryResource();
    public  DirectoryResource(String rootDirectory);
    public  DirectoryResource(File rootDirectory);

}