Throw exception instead of returning null if file can't be read.

This commit is contained in:
hns 2009-03-17 14:26:11 +00:00
parent fab316995a
commit 6d6f9ff341

View file

@ -54,12 +54,8 @@ public class FileResource extends AbstractResource {
return baseName;
}
public InputStream getInputStream() {
try {
return new FileInputStream(file);
} catch (FileNotFoundException ex) {
return null;
}
public InputStream getInputStream() throws IOException {
return new FileInputStream(file);
}
public URL getUrl() {