|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
com.aliasi.xml.SimpleElementHandler
com.aliasi.xml.SAXFilterHandler
com.aliasi.xml.GroupCharactersFilter
public class GroupCharactersFilter
Provides a SAX filter that groups sequential calls to characters(char[],int,int) into a single call with all of the
content concatenated. A flag may be supplied at construction time
that will cause all character content that is all whitespace, as
defined by Strings.allWhitespace(char[],int,int) to be
ignored.
| Field Summary |
|---|
| Fields inherited from class com.aliasi.xml.SAXFilterHandler |
|---|
mHandler |
| Fields inherited from class com.aliasi.xml.SimpleElementHandler |
|---|
CDATA_ATTS_TYPE, EMPTY_ATTS, NO_OP_DEFAULT_HANDLER |
| Constructor Summary | |
|---|---|
GroupCharactersFilter(DefaultHandler handler)
Construct a character grouping filter that delegates events to the specified handler. |
|
GroupCharactersFilter(DefaultHandler handler,
boolean removeWhitespace)
Construct a character grouping filter without a specified handler to which to delegate events. |
|
| Method Summary | |
|---|---|
void |
characters(char[] ch,
int start,
int length)
Adds the characters to the character accumulator. |
void |
endDocument()
End the document, delegating the call to the contained handler, after calling characters(char[],int,int) on
any accumulated characters. |
void |
endElement(String namespaceURI,
String localName,
String qName)
Ends the specified element, delegating the SAX event to the contained handler, after calling characters(char[],int,int) to handle any accumulated
characters. |
void |
startDocument()
Start the document, delegating the call to the contained handler. |
void |
startElement(String namespaceURI,
String localName,
String qName,
Attributes atts)
Start the specified element, delegating the SAX event to the contained handler, after calling characters(char[],int,int) to handle any accumulated
characters. |
| Methods inherited from class com.aliasi.xml.SAXFilterHandler |
|---|
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, setHandler, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GroupCharactersFilter(DefaultHandler handler)
SAXFilterHandler.setHandler(DefaultHandler).
handler - Handler to which events are delegated.
public GroupCharactersFilter(DefaultHandler handler,
boolean removeWhitespace)
SAXFilterHandler.setHandler(DefaultHandler).
| Method Detail |
|---|
public void startDocument()
throws SAXException
startDocument in interface ContentHandlerstartDocument in class SAXFilterHandlerSAXException - If there is an exception raised by the
contained handler.
public void endDocument()
throws SAXException
characters(char[],int,int) on
any accumulated characters.
endDocument in interface ContentHandlerendDocument in class SAXFilterHandlerSAXException - If there is an exception raised by the
contained handler.
public void startElement(String namespaceURI,
String localName,
String qName,
Attributes atts)
throws SAXException
characters(char[],int,int) to handle any accumulated
characters.
startElement in interface ContentHandlerstartElement in class SAXFilterHandlernamespaceURI - The URI of the namespace for this element.localName - The local name (without prefix) for this
element.qName - The qualified name (with prefix, if any) for this
element.atts - The attributes for this element.
SAXException - If there is an exception raised by the
contained handler.
public void endElement(String namespaceURI,
String localName,
String qName)
throws SAXException
characters(char[],int,int) to handle any accumulated
characters.
endElement in interface ContentHandlerendElement in class SAXFilterHandlernamespaceURI - The URI of the namespace for this element.localName - The local name (without prefix) for this
element.qName - The qualified name (with prefix, if any) for this
element.
SAXException - If there is an exception raised by the
contained handler.
public final void characters(char[] ch,
int start,
int length)
throws SAXException
characters in interface ContentHandlercharacters in class SAXFilterHandlerch - Array of characters to add to accumulator.start - First character to accumulate.length - Number of characters to accumulate.
SAXException - if the contained hanlder throws a SAX
exception.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||