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 class
static final class
static final class
static final class
static final class
static final class
static final class
static final class
static final class
static final class
static interface
SaxBit is a representation of the SAX event.static final class
static final class
static final class
static final class
static final class
static final class
static final class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<SaxBuffer.SaxBit>
Stores list ofSaxBuffer.SaxBit
objects. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final void
addBit
(SaxBuffer.SaxBit bit) Adds a SaxBit to the bits listprotected final Iterator
bits()
Iterates through the bits listvoid
characters
(char[] ch, int start, int length) void
comment
(char[] ch, int start, int length) void
void
endCDATA()
void
void
endDTD()
void
endElement
(String namespaceURI, String localName, String qName) void
void
endPrefixMapping
(String prefix) getBits()
void
ignorableWhitespace
(char[] ch, int start, int length) boolean
isEmpty()
void
processingInstruction
(String target, String data) void
recycle()
void
setDocumentLocator
(Locator locator) void
skippedEntity
(String name) void
void
void
void
startElement
(String namespaceURI, String localName, String qName, Attributes atts) void
startEntity
(String name) void
startPrefixMapping
(String prefix, String uri) void
toSAX
(ContentHandler contentHandler) toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.xml.sax.ContentHandler
declaration
-
Field Details
-
saxbits
Stores list ofSaxBuffer.SaxBit
objects.
-
-
Constructor Details
-
SaxBuffer
public SaxBuffer()Creates empty SaxBuffer -
SaxBuffer
Creates copy of another SaxBuffer
-
-
Method Details
-
skippedEntity
- Specified by:
skippedEntity
in interfaceContentHandler
- Throws:
SAXException
-
setDocumentLocator
- Specified by:
setDocumentLocator
in interfaceContentHandler
-
ignorableWhitespace
- Specified by:
ignorableWhitespace
in interfaceContentHandler
- Throws:
SAXException
-
processingInstruction
- Specified by:
processingInstruction
in interfaceContentHandler
- Throws:
SAXException
-
startDocument
- Specified by:
startDocument
in interfaceContentHandler
- Throws:
SAXException
-
startElement
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException - Specified by:
startElement
in interfaceContentHandler
- Throws:
SAXException
-
endPrefixMapping
- Specified by:
endPrefixMapping
in interfaceContentHandler
- Throws:
SAXException
-
characters
- Specified by:
characters
in interfaceContentHandler
- Throws:
SAXException
-
endElement
- Specified by:
endElement
in interfaceContentHandler
- Throws:
SAXException
-
endDocument
- Specified by:
endDocument
in interfaceContentHandler
- Throws:
SAXException
-
startPrefixMapping
- Specified by:
startPrefixMapping
in interfaceContentHandler
- Throws:
SAXException
-
endCDATA
- Specified by:
endCDATA
in interfaceLexicalHandler
- Throws:
SAXException
-
comment
- Specified by:
comment
in interfaceLexicalHandler
- Throws:
SAXException
-
startEntity
- Specified by:
startEntity
in interfaceLexicalHandler
- Throws:
SAXException
-
endDTD
- Specified by:
endDTD
in interfaceLexicalHandler
- Throws:
SAXException
-
startDTD
- Specified by:
startDTD
in interfaceLexicalHandler
- Throws:
SAXException
-
startCDATA
- Specified by:
startCDATA
in interfaceLexicalHandler
- Throws:
SAXException
-
endEntity
- Specified by:
endEntity
in 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
-