Package com.github.jknack.handlebars.io
Interface TemplateSource
-
- All Known Implementing Classes:
AbstractTemplateSource
,ForwardingTemplateSource
,ReloadableTemplateSource
,StringTemplateSource
,URLTemplateSource
public interface TemplateSource
The template source. Implementation ofTemplateSource
must 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.String
content(java.nio.charset.Charset charset)
The template content.java.lang.String
filename()
The file's name.long
lastModified()
The last modified date.
-
-
-
Method Detail
-
content
java.lang.String content(java.nio.charset.Charset charset) throws java.io.IOException
The 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.
-
-