public class FreeMarkerTemplate extends TextTemplate
properties| Constructor and Description |
|---|
FreeMarkerTemplate(InputStream inputStream)
Constructs a new FreeMarkerTemplate with given template text.
|
FreeMarkerTemplate(InputStream inputStream,
String charsetName)
Constructs a new FreeMarkerTemplate with given template text.
|
FreeMarkerTemplate(String templateText,
Map<String,Object> map)
Constructs a new FreeMarkerTemplate with given template text.
|
| Modifier and Type | Method and Description |
|---|---|
String |
compile()
Compiles this template.
|
void |
compileAndWrite(Writer writer)
Compiles this template and writes result using given writer.
|
put, putpublic FreeMarkerTemplate(InputStream inputStream) throws IOException
inputStream - the InputStream that provides template text on FreeMarker template language
with UTF-8 charset.IOException - in case of some errors during reading and parsing of given template text.public FreeMarkerTemplate(InputStream inputStream, String charsetName) throws IOException
inputStream - the InputStream that provides template text on FreeMarker template language.charsetName - the name of template text charset.IOException - in case of some errors during reading and parsing of given template text.public FreeMarkerTemplate(String templateText, Map<String,Object> map) throws IOException
templateText - the string with template text on FreeMarker template language.map - the map with properties that is intended to use for substitution of variables within
this template.IOException - in case of some errors during reading and parsing of given template text.public String compile()
compile in class TextTemplatepublic void compileAndWrite(Writer writer)
compileAndWrite in class TextTemplatewriter - the Writer used for writing the result of compilation.Copyright © 2023. All rights reserved.