Package com.github.jknack.handlebars.io
Interface TemplateSource
-
- All Known Implementing Classes:
AbstractTemplateSource,ForwardingTemplateSource,ReloadableTemplateSource,StringTemplateSource,URLTemplateSource
public interface TemplateSourceThe template source. Implementation ofTemplateSourcemust implementequals(Object)andhashCode()methods. This two methods are the core of the cache system.- Since:
- 0.11.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Stringcontent(java.nio.charset.Charset charset)The template content.java.lang.Stringfilename()The file's name.longlastModified()The last modified date.
-
-
-
Method Detail
-
content
java.lang.String content(java.nio.charset.Charset charset) throws java.io.IOExceptionThe template content.- Parameters:
charset- Charset to use.- Returns:
- The template content.
- Throws:
java.io.IOException- If the template can't read.
-
filename
java.lang.String filename()
The file's name.- Returns:
- The file's name.
-
lastModified
long lastModified()
The last modified date.- Returns:
- The last modified date.
-
-