|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object freemarker.template.BinaryDataFactory
public final class BinaryDataFactory
A factory class that can create BinaryData objects for various inputs.
Field Summary | |
---|---|
static BinaryDataFactory |
INSTANCE
The singleton instance of this BinaryDataFactory. |
Method Summary | |
---|---|
BinaryData |
create(CompileableFactoryParameters params)
Create an instance of a BinaryData object from the given InputStream. |
BinaryData |
createFromFile(java.io.File file)
Create an instance of a BinaryData object from the given file. |
BinaryData |
createFromFile(java.lang.String filePath)
Create an instance of a BinaryData object from the given file path. |
BinaryData |
createFromStream(java.io.InputStream stream)
Create an instance of a BinaryData object from the given InputStream. |
BinaryData |
createFromStream(java.io.InputStream stream,
java.lang.String encoding)
Create an instance of a BinaryData object from the given InputStream. |
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 BinaryDataFactory INSTANCE
Method Detail |
---|
public java.lang.String getName()
getName
in interface CompileableFactory<BinaryData>
public BinaryData create(CompileableFactoryParameters params) throws java.io.IOException
create
in interface CompileableFactory<BinaryData>
params
-
java.io.IOException
- there was a problem reading from the input streampublic BinaryData createFromStream(java.io.InputStream stream) throws java.io.IOException
stream
- the input stream from which the BinaryData object
will be created
java.io.IOException
- there was a problem reading from the input streampublic BinaryData createFromStream(java.io.InputStream stream, java.lang.String encoding) throws java.io.IOException
stream
- the input stream from which the BinaryData object
will be createdencoding
- ignored
java.io.IOException
- there was a problem reading from the input streampublic BinaryData createFromFile(java.io.File file) throws java.io.IOException
file
- the file from which the BinaryData object will be
created
java.io.IOException
- there was a problem reading from the input streampublic BinaryData createFromFile(java.lang.String filePath) throws java.io.IOException
filePath
- the file path from which the BinaryData object
will be created
java.io.IOException
- there was a problem reading from the input stream
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |