freemarker.template
Interface Compileable

All Known Implementing Classes:
AbstractTemplate, BinaryData, Template, UnparsedTemplate

public interface Compileable

Defines an interface for three ways of compiling a template: from an InputStream, and optionally, a character encoding.

Version:
$Id: Compileable.java 1129 2005-10-04 11:42:05Z run2000 $

Method Summary
 void compile(InputSource source)
          Compiles the template from an InputSource.
 void compileFromStream(java.io.InputStream stream)
          Deprecated. use the compile(freemarker.template.InputSource) method to supply source streams to the template compiler
 void compileFromStream(java.io.InputStream stream, java.lang.String encoding)
          Deprecated. use the compile(freemarker.template.InputSource) method to supply source streams to the template compiler
 

Method Detail

compileFromStream

@Deprecated
void compileFromStream(java.io.InputStream stream)
                       throws java.io.IOException,
                              ParseException
Deprecated. use the compile(freemarker.template.InputSource) method to supply source streams to the template compiler

Compiles the template from an InputStream, using the platform's default character encoding. If the template has already been compiled, this method does nothing.

Parameters:
stream - an InputStream from which the template can be read.
Throws:
java.io.IOException
ParseException

compileFromStream

@Deprecated
void compileFromStream(java.io.InputStream stream,
                                  java.lang.String encoding)
                       throws java.io.IOException,
                              ParseException
Deprecated. use the compile(freemarker.template.InputSource) method to supply source streams to the template compiler

Compiles the template from an InputStream, using the specified character encoding. If the template has already been compiled, this method does nothing.

Parameters:
stream - an InputStream from which the template can be read.
encoding - the text encoding of the InputStream
Throws:
java.io.IOException
ParseException

compile

void compile(InputSource source)
             throws java.io.IOException,
                    java.lang.IllegalArgumentException
Compiles the template from an InputSource. If the template has already been compiled, this method does nothing.

Parameters:
source - an InputSource from which the template can be read.
Throws:
java.io.IOException
java.lang.IllegalArgumentException