public class FileResourceLoader extends ResourceLoader
className, isCachingOn, log, modificationCheckInterval, rsvc| Constructor and Description |
|---|
FileResourceLoader() |
| Modifier and Type | Method and Description |
|---|---|
long |
getLastModified(Resource resource)
Get the last modified time of the InputStream source
that was used to create the template.
|
Reader |
getResourceReader(String templateName,
String encoding)
Get a Reader so that the Runtime can build a
template with it.
|
void |
init(ExtProperties configuration)
Initialize the template loader with a
a resources class.
|
boolean |
isSourceModified(Resource resource)
How to keep track of all the modified times
across the paths.
|
boolean |
resourceExists(String name)
Overrides superclass for better performance.
|
buildReader, commonInit, getClassName, getModificationCheckInterval, isCachingOn, setCachingOn, setModificationCheckIntervalpublic void init(ExtProperties configuration)
ResourceLoaderinit in class ResourceLoaderResourceLoader.init(org.apache.velocity.util.ExtProperties)public Reader getResourceReader(String templateName, String encoding) throws ResourceNotFoundException
getResourceReader in class ResourceLoadertemplateName - name of template to getResourceNotFoundException - if template not found
in the file template path.public boolean resourceExists(String name)
resourceExists in class ResourceLoadername - The name of a resource.public boolean isSourceModified(Resource resource)
isSourceModified in class ResourceLoaderresource - public long getLastModified(Resource resource)
ResourceLoadergetLastModified in class ResourceLoaderResourceLoader.getLastModified(org.apache.velocity.runtime.resource.Resource)Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.