protected InputStream loadFromRelativePath(String name) { try { return super.getResourceStream(name); } catch (ResourceNotFoundException rnfex) { return null; } }
File file = getFile(path, template); closeQuiet(fis); throw e;
public void init( ExtendedProperties configuration) { fileResourceLoader.init(configuration); }
rawStream = findTemplate(path, template); if (rawStream != null) reader = buildReader(rawStream, encoding); closeQuiet(rawStream); String msg = "Exception while loading Template " + template; log.error(msg, ioe);
/** * @see org.apache.velocity.runtime.resource.loader.ResourceLoader#getLastModified(org.apache.velocity.runtime.resource.Resource) */ public long getLastModified(Resource resource) { String path = (String) templatePaths.get(resource.getName()); File file = getFile(path, resource.getName()); if (file.canRead()) { return file.lastModified(); } else { return 0; } }
InputStream inputStream = findTemplate(path, template);
public FederatedResourceLoader() { loaders.add(new FileResourceLoader()); loaders.add(new SimplerFileResourceLoader()); loaders.add(new URLResourceLoader()); loaders.add(new ClasspathResourceLoader()); }
/** * @see ResourceLoader#getLastModified(org.apache.velocity.runtime.resource.Resource) */ public long getLastModified(Resource resource) { String path = (String) templatePaths.get(resource.getName()); File file = getFile(path, resource.getName()); if (file.canRead()) { return file.lastModified(); } else { return 0; } }
inputStream = findTemplate(path, template);
protected InputStream loadFromRelativePath(String name) { try { return super.getResourceStream(name); } catch (ResourceNotFoundException rnfex) { return null; } }
File file = getFile(path,template); closeQuiet(uis); throw e; closeQuiet(fis); throw e;
/** * @see org.apache.velocity.runtime.resource.loader.ResourceLoader#getLastModified(org.apache.velocity.runtime.resource.Resource) */ public long getLastModified(Resource resource) { String path = (String) templatePaths.get(resource.getName()); File file = getFile(path, resource.getName()); if (file.canRead()) { return file.lastModified(); } else { return 0; } }
inputStream = findTemplate(path, template);
/** * @see org.apache.velocity.runtime.resource.loader.ResourceLoader#init(ExtendedProperties) */ public void init(ExtendedProperties arg0) { rsvc.info("AbsFileResourceLoader : initialization starting."); super.init(arg0); }
protected InputStream loadFromRelativePath(String name) { try { return super.getResourceStream(name); } catch (ResourceNotFoundException rnfex) { return null; } }
File file = getFile(path,template); closeQuiet(uis); throw e; closeQuiet(fis); throw e;
File file = getFile(path, name); if (file.canRead())
/** * @see org.apache.velocity.runtime.resource.loader.ResourceLoader#init(ExtendedProperties) */ public void init(ExtendedProperties arg0) { rsvc.info("AbsFileResourceLoader : initialization starting."); super.init(arg0); }
protected InputStream loadFromRelativePath(String name) { try { return super.getResourceStream(name); } catch (ResourceNotFoundException rnfex) { return null; } }