Package webit.script.loaders.impl.resources

Source Code of webit.script.loaders.impl.resources.NotFoundResource

// 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);
    }
}
TOP

Related Classes of webit.script.loaders.impl.resources.NotFoundResource

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.