freemarker.ext.misc
Class FreeMarkerToHtml

java.lang.Object
  extended by freemarker.ext.misc.FreeMarkerToHtml
All Implemented Interfaces:
TemplateModel, TemplateTransformModel2, java.io.Serializable

public final class FreeMarkerToHtml
extends java.lang.Object
implements TemplateTransformModel2, java.io.Serializable

A FM-Classic transformer that performs syntax colouring of FM-Classic source files, and outputs the results in HTML. The HTML is HTML 3.2 compliant, though later transitional DTDs should have no problems with this code.

The transformation uses the Jakarta ORO regular expression library, available from the Jakarta Apache web site.

Version:
$Id: FreeMarkerToHtml.java 1152 2013-04-15 10:34:50Z run2000 $
Author:
Nicholas Cull
See Also:
Serialized Form

Constructor Summary
FreeMarkerToHtml()
          Creates new FreeMarkerToHtml
 
Method Summary
 boolean isEmpty()
          Is the object empty?
 void transform(java.io.Reader source, java.io.Writer output)
          Performs a transformation/filter on FM-Classic output.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FreeMarkerToHtml

public FreeMarkerToHtml()
Creates new FreeMarkerToHtml

Method Detail

transform

public void transform(java.io.Reader source,
                      java.io.Writer output)
               throws java.io.IOException,
                      TemplateModelException
Performs a transformation/filter on FM-Classic output.

Specified by:
transform in interface TemplateTransformModel2
Parameters:
source - the input to be transformed
output - the destination of the transformation
Throws:
java.io.IOException
TemplateModelException

isEmpty

public boolean isEmpty()
Is the object empty?

Specified by:
isEmpty in interface TemplateModel
Returns:
false, to indicate this object is not empty