return resource.getUrl();
}
@Override
public InputStream getResourceAsStream(final String path) {
Resource resource = null;
try {
resource = deploymentInfo.getResourceManager().getResource(path);
} catch (IOException e) {
return null;
}
if (resource == null) {
return null;
}
try {
if (resource.getFile() != null) {
return new BufferedInputStream(new FileInputStream(resource.getFile()));
} else {
return new BufferedInputStream(resource.getUrl().openStream());
}
} catch (FileNotFoundException e) {
//should never happen, as the resource loader should return null in this case
return null;
} catch (IOException e) {