org.ujac.print
Class DefaultContentFilter

java.lang.Object
  extended by org.ujac.print.DefaultContentFilter
All Implemented Interfaces:
ContentFilter

public class DefaultContentFilter
extends Object
implements ContentFilter

Name: DefaultContentFilter
Description: Default ContentFilter implementation.

Author:
lauerc

Constructor Summary
DefaultContentFilter()
           
 
Method Summary
 void filterContents(BaseDocumentTag tag, String contents, int offset, StringBuffer outputBuffer)
          Filters the given contents
protected  int processEscapeSequence(BaseDocumentTag tag, String contents, int offset, StringBuffer outputBuffer)
          Processes the escape sequence at offset position in the given contents string and prints the translated characters to the given output buffer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultContentFilter

public DefaultContentFilter()
Method Detail

filterContents

public void filterContents(BaseDocumentTag tag,
                           String contents,
                           int offset,
                           StringBuffer outputBuffer)
                    throws DocumentHandlerException
Description copied from interface: ContentFilter
Filters the given contents

Specified by:
filterContents in interface ContentFilter
Parameters:
tag - The tag for which to filter the contents.
contents - The contents to filter.
offset - The offset where to start filtering the content string.
outputBuffer - The buffer holding the content processing result.
Throws:
DocumentHandlerException - In case the content filtering failed.
See Also:
org.ujac.print.ContentFilter#filterContents(java.lang.String, int, java.lang.StringBuffer)

processEscapeSequence

protected int processEscapeSequence(BaseDocumentTag tag,
                                    String contents,
                                    int offset,
                                    StringBuffer outputBuffer)
                             throws DocumentHandlerException
Processes the escape sequence at offset position in the given contents string and prints the translated characters to the given output buffer.

Parameters:
tag - The tag for which to filter the contents.
contents - The contents to filter.
offset - The offset where to start filtering the content string.
outputBuffer - The buffer holding the content processing result.
Returns:
The offset after the terminated escape sequence.
Throws:
DocumentHandlerException - In case the escape sequence could not be processed.


Copyright © 2003-2004 UJAC.org. All Rights Reserved.