webit.script.loaders.impl.resources.NotFoundResource Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of webit-script Show documentation
Show all versions of webit-script Show documentation
a template-like script and engine, all writen with Java.
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);
}
}