All Downloads are FREE. Search and download functionalities are using the official Maven repository.

webit.script.loaders.impl.resources.NotFoundResource Maven / Gradle / Ivy

The newest version!
// Copyright (c) 2013, Webit Team. All Rights Reserved.
package webit.script.loaders.impl.resources;

import java.io.IOException;
import java.io.Reader;
import webit.script.exceptions.ResourceNotFoundException;
import webit.script.loaders.Resource;

/**
 * @version 1.5.0
 * @author Zqq
 */
public class NotFoundResource implements Resource {

    protected String name;
    protected String message;

    public NotFoundResource(String name, String message) {
        this.name = name;
        this.message = message;
    }

    public boolean isModified() {
        return false;
    }

    public boolean exists() {
        return false;
    }

    public Reader openReader() throws IOException {
        throw new ResourceNotFoundException(message);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy