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, setModificationCheckInterval
public void init(ExtProperties configuration)
ResourceLoader
init
in class ResourceLoader
ResourceLoader.init(org.apache.velocity.util.ExtProperties)
public Reader getResourceReader(String templateName, String encoding) throws ResourceNotFoundException
getResourceReader
in class ResourceLoader
templateName
- name of template to getResourceNotFoundException
- if template not found
in the file template path.public boolean resourceExists(String name)
resourceExists
in class ResourceLoader
name
- The name of a resource.public boolean isSourceModified(Resource resource)
isSourceModified
in class ResourceLoader
resource
- public long getLastModified(Resource resource)
ResourceLoader
getLastModified
in class ResourceLoader
ResourceLoader.getLastModified(org.apache.velocity.runtime.resource.Resource)
Copyright © 2000–2021 The Apache Software Foundation. All rights reserved.