Package org.apache.velocity.script
Class VelocityScriptEngine.SingleResourceReader
- java.lang.Object
-
- org.apache.velocity.runtime.resource.loader.ResourceLoader
-
- org.apache.velocity.runtime.resource.loader.StringResourceLoader
-
- org.apache.velocity.script.VelocityScriptEngine.SingleResourceReader
-
- Enclosing class:
- VelocityScriptEngine
protected static class VelocityScriptEngine.SingleResourceReader extends StringResourceLoader
-
-
Field Summary
-
Fields inherited from class org.apache.velocity.runtime.resource.loader.StringResourceLoader
repository, REPOSITORY_CLASS, REPOSITORY_CLASS_DEFAULT, REPOSITORY_ENCODING, REPOSITORY_NAME, REPOSITORY_NAME_DEFAULT, REPOSITORY_STATIC, REPOSITORY_STATIC_DEFAULT, STATIC_REPOSITORIES
-
Fields inherited from class org.apache.velocity.runtime.resource.loader.ResourceLoader
className, isCachingOn, log, modificationCheckInterval, rsvc
-
-
Constructor Summary
Constructors Constructor Description SingleResourceReader(Reader r)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Reader
getResourceReader(String source, String encoding)
Get a reader so that the Runtime can build a template with it.-
Methods inherited from class org.apache.velocity.runtime.resource.loader.StringResourceLoader
clearRepositories, createRepository, getLastModified, getRepository, getRepository, init, isSourceModified, removeRepository, resourceExists, setRepository
-
Methods inherited from class org.apache.velocity.runtime.resource.loader.ResourceLoader
buildReader, commonInit, getClassName, getModificationCheckInterval, isCachingOn, setCachingOn, setModificationCheckInterval
-
-
-
-
Constructor Detail
-
SingleResourceReader
public SingleResourceReader(Reader r)
-
-
Method Detail
-
getResourceReader
public Reader getResourceReader(String source, String encoding) throws ResourceNotFoundException
Description copied from class:StringResourceLoader
Get a reader so that the Runtime can build a template with it.- Overrides:
getResourceReader
in classStringResourceLoader
- Parameters:
source
- name of template to get.encoding
- asked encoding- Returns:
- Reader containing the template.
- Throws:
ResourceNotFoundException
- Ff template not found in the RepositoryFactory.
-
-