|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object freemarker.template.TemplateFactory
public final class TemplateFactory
A factory class that can create Template objects for various inputs.
Field Summary | |
---|---|
static TemplateFactory |
INSTANCE
The singleton instance of this TemplateFactory. |
Method Summary | |
---|---|
Template |
create(CompileableFactoryParameters params)
Create an instance of a Template object from the given InputStream, using the named character encoding. |
Template |
createFromFile(java.io.File file)
Create an instance of a Template object from the given file, using the platform default character encoding. |
Template |
createFromFile(java.io.File file,
java.lang.String encoding)
Create an instance of a Template object from the given file, using the named character encoding. |
Template |
createFromFile(java.lang.String filePath)
Create an instance of a Template object from the given file path, using the platform default character encoding. |
Template |
createFromFile(java.lang.String filePath,
java.lang.String encoding)
Create an instance of a Template object from the given file, using the named character encoding. |
Template |
createFromReader(java.io.Reader reader)
Create an instance of a Template object from the given Reader. |
Template |
createFromStream(java.io.InputStream stream)
Create an instance of a Template object from the given InputStream, using the platform default character encoding. |
Template |
createFromStream(java.io.InputStream stream,
java.lang.String encoding)
Create an instance of a Template object from the given InputStream, using the named character encoding. |
Template |
createFromString(java.lang.String str)
Create an instance of a Template object from the given String. |
java.lang.String |
getName()
Return a name for the compilable object created by this factory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final TemplateFactory INSTANCE
Method Detail |
---|
public java.lang.String getName()
getName
in interface CompileableFactory<Template>
public Template create(CompileableFactoryParameters params) throws java.io.IOException
create
in interface CompileableFactory<Template>
params
-
java.io.IOException
- there was a problem reading from the input streampublic Template createFromStream(java.io.InputStream stream) throws java.io.IOException
stream
- the input stream from which the Template object
will be created
java.io.IOException
- there was a problem reading from the input streampublic Template createFromStream(java.io.InputStream stream, java.lang.String encoding) throws java.io.IOException
stream
- the input stream from which the Template object
will be createdencoding
- the character encoding of the input stream
java.io.IOException
- there was a problem reading from the input streampublic Template createFromFile(java.io.File file) throws java.io.IOException
file
- the file from which the Template object will be
created
java.io.IOException
- there was a problem reading from the filepublic Template createFromFile(java.io.File file, java.lang.String encoding) throws java.io.IOException
file
- the file from which the Template object will be
createdencoding
- the character encoding of the file
java.io.IOException
- there was a problem reading from the filepublic Template createFromFile(java.lang.String filePath) throws java.io.IOException
filePath
- the file from which the Template object will be
created
java.io.IOException
- there was a problem reading from the file pathpublic Template createFromFile(java.lang.String filePath, java.lang.String encoding) throws java.io.IOException
filePath
- the file from which the Template object will be
createdencoding
- the character encoding of the file
java.io.IOException
- there was a problem reading from the filepublic Template createFromReader(java.io.Reader reader) throws java.io.IOException
reader
- the reader from which the Template object
will be created
java.io.IOException
- there was a problem reading from the readerpublic Template createFromString(java.lang.String str) throws java.io.IOException
str
- the string from which the Template object
will be created
java.io.IOException
- there was a problem reading from the string
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |