throw new ResourceNotFoundException("Invalid ThemeRL key "+name);
// lookup the template from the proper theme
ThemeManager themeMgr = RollerFactory.getRoller().getThemeManager();
Theme theme = themeMgr.getTheme(split[0]);
ThemeTemplate template = theme.getTemplate(split[1]);
if(template == null)
throw new ResourceNotFoundException("Template ["+split[1]+
"] doesn't seem to be part of theme ["+split[0]+"]");
mLogger.debug("Resource found!");
// return the input stream
return new ByteArrayInputStream(template.getContents().getBytes("UTF-8"));
} catch (UnsupportedEncodingException uex) {
// We expect UTF-8 in all JRE installation.
// This rethrows as a Runtime exception after logging.
mLogger.error(uex);