Package org.outerj.daisy.diff.helper
Class SaxBuffer
java.lang.Object
org.outerj.daisy.diff.helper.SaxBuffer
- All Implemented Interfaces:
Serializable,ContentHandler,LexicalHandler
A class that can record SAX events and replay them later.
This class was copied form the Apache Cocoon.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final classstatic final classstatic final classstatic final classstatic final classstatic final classstatic final classstatic final classstatic final classstatic interfaceSaxBit is a representation of the SAX event.static final classstatic final classstatic final classstatic final classstatic final classstatic final classstatic final class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<SaxBuffer.SaxBit>Stores list ofSaxBuffer.SaxBitobjects. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidaddBit(SaxBuffer.SaxBit bit) Adds a SaxBit to the bits listprotected final Iteratorbits()Iterates through the bits listvoidcharacters(char[] ch, int start, int length) voidcomment(char[] ch, int start, int length) voidvoidendCDATA()voidvoidendDTD()voidendElement(String namespaceURI, String localName, String qName) voidvoidendPrefixMapping(String prefix) getBits()voidignorableWhitespace(char[] ch, int start, int length) booleanisEmpty()voidprocessingInstruction(String target, String data) voidrecycle()voidsetDocumentLocator(Locator locator) voidskippedEntity(String name) voidvoidvoidvoidstartElement(String namespaceURI, String localName, String qName, Attributes atts) voidstartEntity(String name) voidstartPrefixMapping(String prefix, String uri) voidtoSAX(ContentHandler contentHandler) toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.xml.sax.ContentHandler
declaration
-
Field Details
-
saxbits
Stores list ofSaxBuffer.SaxBitobjects.
-
-
Constructor Details
-
SaxBuffer
public SaxBuffer()Creates empty SaxBuffer -
SaxBuffer
Creates copy of another SaxBuffer
-
-
Method Details
-
skippedEntity
- Specified by:
skippedEntityin interfaceContentHandler- Throws:
SAXException
-
setDocumentLocator
- Specified by:
setDocumentLocatorin interfaceContentHandler
-
ignorableWhitespace
- Specified by:
ignorableWhitespacein interfaceContentHandler- Throws:
SAXException
-
processingInstruction
- Specified by:
processingInstructionin interfaceContentHandler- Throws:
SAXException
-
startDocument
- Specified by:
startDocumentin interfaceContentHandler- Throws:
SAXException
-
startElement
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException - Specified by:
startElementin interfaceContentHandler- Throws:
SAXException
-
endPrefixMapping
- Specified by:
endPrefixMappingin interfaceContentHandler- Throws:
SAXException
-
characters
- Specified by:
charactersin interfaceContentHandler- Throws:
SAXException
-
endElement
- Specified by:
endElementin interfaceContentHandler- Throws:
SAXException
-
endDocument
- Specified by:
endDocumentin interfaceContentHandler- Throws:
SAXException
-
startPrefixMapping
- Specified by:
startPrefixMappingin interfaceContentHandler- Throws:
SAXException
-
endCDATA
- Specified by:
endCDATAin interfaceLexicalHandler- Throws:
SAXException
-
comment
- Specified by:
commentin interfaceLexicalHandler- Throws:
SAXException
-
startEntity
- Specified by:
startEntityin interfaceLexicalHandler- Throws:
SAXException
-
endDTD
- Specified by:
endDTDin interfaceLexicalHandler- Throws:
SAXException
-
startDTD
- Specified by:
startDTDin interfaceLexicalHandler- Throws:
SAXException
-
startCDATA
- Specified by:
startCDATAin interfaceLexicalHandler- Throws:
SAXException
-
endEntity
- Specified by:
endEntityin interfaceLexicalHandler- Throws:
SAXException
-
addBit
Adds a SaxBit to the bits list -
bits
Iterates through the bits list -
isEmpty
public boolean isEmpty() -
getBits
-
toSAX
- Throws:
SAXException
-
toString
-
recycle
public void recycle() -
dump
- Throws:
IOException
-