net.sf.joost.emitter
Class StringEmitter

java.lang.Object
  extended by net.sf.joost.emitter.StxEmitterBase
      extended by net.sf.joost.emitter.StringEmitter
All Implemented Interfaces:
Constants, StxEmitter, ContentHandler, LexicalHandler

public final class StringEmitter
extends StxEmitterBase

This class implements an emitter that collects characters events

Version:
$Revision: 1.9 $ $Date: 2007/11/25 14:18:02 $
Author:
Oliver Becker

Field Summary
private  StringBuffer buffer
          the string buffer
private  String errorInfo
          additional info for error messages, null means: don't report errors
 
Fields inherited from interface net.sf.joost.Constants
DEBUG, DEFAULT_ENCODING, FEAT_NS, FEAT_NSPREFIX, FEATURE_URI_PREFIX, FUNC_NS, JOOST_EXT_NS, PR_ATTRIBUTES, PR_BUFFER, PR_CHILDREN, PR_CONTINUE, PR_ERROR, PR_SELF, PR_SIBLINGS, STX_NS
 
Constructor Summary
StringEmitter()
           
StringEmitter(StringBuffer buffer, String errorInfo)
           
 
Method Summary
 void characters(char[] ch, int start, int length)
          Add the characters to the internal buffer
 void comment(char[] ch, int start, int length)
          not allowed
 void endCDATA()
          not allowed
 void endDocument()
          do nothing
 void endDTD()
          not used
 void endElement(String namespaceURI, String localName, String qName)
          not allowed
 void endEntity(String name)
          not used
 void endPrefixMapping(String prefix)
          do nothing
 StringBuffer getBuffer()
           
 void ignorableWhitespace(char[] ch, int start, int length)
          not used
 void processingInstruction(String target, String data)
          not allowed
 void setDocumentLocator(Locator locator)
          not used
 void skippedEntity(String name)
          not used
 void startCDATA()
          not allowed
 void startDocument()
          do nothing
 void startDTD(String name, String publicId, String systemId)
          not used
 void startElement(String namespaceURI, String localName, String qName, Attributes atts)
          not allowed
 void startEntity(String name)
          not used
 void startPrefixMapping(String prefix, String uri)
          do nothing
 
Methods inherited from class net.sf.joost.emitter.StxEmitterBase
getSystemId, setSystemId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

buffer

private StringBuffer buffer
the string buffer


errorInfo

private String errorInfo
additional info for error messages, null means: don't report errors

Constructor Detail

StringEmitter

public StringEmitter()

StringEmitter

public StringEmitter(StringBuffer buffer,
                     String errorInfo)
Method Detail

getBuffer

public StringBuffer getBuffer()
Returns:
the string buffer for this emitter

setDocumentLocator

public void setDocumentLocator(Locator locator)
not used


startDocument

public void startDocument()
                   throws SAXException
do nothing

Throws:
SAXException

endDocument

public void endDocument()
                 throws SAXException
do nothing

Throws:
SAXException

startPrefixMapping

public void startPrefixMapping(String prefix,
                               String uri)
                        throws SAXException
do nothing

Throws:
SAXException

endPrefixMapping

public void endPrefixMapping(String prefix)
                      throws SAXException
do nothing

Throws:
SAXException

startElement

public void startElement(String namespaceURI,
                         String localName,
                         String qName,
                         Attributes atts)
                  throws SAXException
not allowed

Throws:
SAXException

endElement

public void endElement(String namespaceURI,
                       String localName,
                       String qName)
                throws SAXException
not allowed

Throws:
SAXException

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws SAXException
Add the characters to the internal buffer

Throws:
SAXException

ignorableWhitespace

public void ignorableWhitespace(char[] ch,
                                int start,
                                int length)
                         throws SAXException
not used

Throws:
SAXException

processingInstruction

public void processingInstruction(String target,
                                  String data)
                           throws SAXException
not allowed

Throws:
SAXException

skippedEntity

public void skippedEntity(String name)
                   throws SAXException
not used

Throws:
SAXException

startDTD

public void startDTD(String name,
                     String publicId,
                     String systemId)
              throws SAXException
not used

Throws:
SAXException

endDTD

public void endDTD()
            throws SAXException
not used

Throws:
SAXException

startEntity

public void startEntity(String name)
                 throws SAXException
not used

Throws:
SAXException

endEntity

public void endEntity(String name)
               throws SAXException
not used

Throws:
SAXException

startCDATA

public void startCDATA()
                throws SAXException
not allowed

Throws:
SAXException

endCDATA

public void endCDATA()
              throws SAXException
not allowed

Throws:
SAXException

comment

public void comment(char[] ch,
                    int start,
                    int length)
             throws SAXException
not allowed

Throws:
SAXException