org.apache.cocoon.transformation.helpers
Class TextRecorder

java.lang.Object
  extended byorg.apache.cocoon.transformation.helpers.NOPRecorder
      extended byorg.apache.cocoon.transformation.helpers.TextRecorder
All Implemented Interfaces:
ContentHandler, LexicalHandler, XMLConsumer, org.apache.cocoon.xml.XMLConsumer

public final class TextRecorder
extends NOPRecorder

This class records all character SAX events and creates a string from them.

Version:
$Id: TextRecorder.html 1304280 2012-03-23 11:18:01Z ilgrosso $

Constructor Summary
TextRecorder()
           
 
Method Summary
 void characters(char[] ary, int start, int length)
           
 String getText()
           
 
Methods inherited from class org.apache.cocoon.transformation.helpers.NOPRecorder
comment, endCDATA, endDocument, endDTD, endElement, endEntity, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startCDATA, startDocument, startDTD, startElement, startEntity, startPrefixMapping
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextRecorder

public TextRecorder()
Method Detail

characters

public void characters(char[] ary,
                       int start,
                       int length)
Specified by:
characters in interface ContentHandler
Overrides:
characters in class NOPRecorder

getText

public String getText()
Returns:
Recorded text so far, trimmed.


Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.