Home » freemarker-2.3.13 » freemarker.cache » [javadoc | source]
freemarker.cache
public interface: TemplateLoader [javadoc | source]

All Known Implementing Classes:
    ClassTemplateLoader, URLTemplateLoader, WebappTemplateLoader, MultiTemplateLoader, StringTemplateLoader, FileTemplateLoader, StatefulTemplateLoader

A template loader is an object that can find the source stream for a template, can retrieve its time of last modification as well as the stream itself. A template loader is plugged into the TemplateCache to provide concrete loading of the templates. The implementations can be coded in a non-threadsafe manner as the natural user of the template loader, TemplateCache does the necessary synchronization.
Method from freemarker.cache.TemplateLoader Summary:
closeTemplateSource,   findTemplateSource,   getLastModified,   getReader
Method from freemarker.cache.TemplateLoader Detail:
 public  void closeTemplateSource(Object templateSource) throws IOException
    Closes the template source. This is the last method that is called by the TemplateCache for a templateSource. The framework guarantees that this method will be called on every object that is returned from #findTemplateSource(String) .
 public Object findTemplateSource(String name) throws IOException
 public long getLastModified(Object templateSource)
    Returns the time of last modification of the specified template source. This method is called after findTemplateSource().
 public Reader getReader(Object templateSource,
    String encoding) throws IOException
    Returns the character stream of a template represented by the specified template source. This method is called after getLastModified() if it is determined that a cached copy of the template is unavailable or stale.