org.cdlib.xtf.dynaXML
Class DefaultDocLocator.LazyPassthru

Object
  extended by DefaultHandler
      extended by DefaultDocLocator.LazyPassthru
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler
Enclosing class:
DefaultDocLocator

private static class DefaultDocLocator.LazyPassthru
extends DefaultHandler

Passes SAX events to a ContentHandler. Also performs character buffering that mimics what the textIndexer normally does.


Field Summary
private  StringBuffer charBuf
           
private  ContentHandler lazyHandler
           
private  boolean stripWhitespace
           
 
Constructor Summary
DefaultDocLocator.LazyPassthru(ContentHandler lazyHandler, boolean stripWhitespace)
           
 
Method Summary
 void characters(char[] ch, int start, int length)
           
 void endDocument()
           
 void endElement(String uri, String localName, String qName)
           
private  void flushCharacters()
           
 void processingInstruction(String target, String data)
           
 void startDocument()
           
 void startElement(String uri, String localName, String qName, Attributes atts)
           
 
Methods inherited from class DefaultHandler
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

charBuf

private StringBuffer charBuf

lazyHandler

private ContentHandler lazyHandler

stripWhitespace

private boolean stripWhitespace
Constructor Detail

DefaultDocLocator.LazyPassthru

public DefaultDocLocator.LazyPassthru(ContentHandler lazyHandler,
                                      boolean stripWhitespace)
Method Detail

startDocument

public void startDocument()
                   throws SAXException
Specified by:
startDocument in interface ContentHandler
Overrides:
startDocument in class DefaultHandler
Throws:
SAXException

startElement

public void startElement(String uri,
                         String localName,
                         String qName,
                         Attributes atts)
                  throws SAXException
Specified by:
startElement in interface ContentHandler
Overrides:
startElement in class DefaultHandler
Throws:
SAXException

endElement

public void endElement(String uri,
                       String localName,
                       String qName)
                throws SAXException
Specified by:
endElement in interface ContentHandler
Overrides:
endElement in class DefaultHandler
Throws:
SAXException

processingInstruction

public void processingInstruction(String target,
                                  String data)
                           throws SAXException
Specified by:
processingInstruction in interface ContentHandler
Overrides:
processingInstruction in class DefaultHandler
Throws:
SAXException

endDocument

public void endDocument()
                 throws SAXException
Specified by:
endDocument in interface ContentHandler
Overrides:
endDocument in class DefaultHandler
Throws:
SAXException

characters

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

flushCharacters

private void flushCharacters()
                      throws SAXException
Throws:
SAXException