org.springframework.util.xml
Class StaxStreamContentHandler

java.lang.Object
  extended by org.springframework.util.xml.AbstractStaxContentHandler
      extended by org.springframework.util.xml.StaxStreamContentHandler
All Implemented Interfaces:
org.xml.sax.ContentHandler

 class StaxStreamContentHandler
extends AbstractStaxContentHandler

SAX ContentHandler that writes to a XMLStreamWriter.

Since:
3.0
Author:
Arjen Poutsma
See Also:
XMLStreamWriter

Field Summary
private  javax.xml.stream.XMLStreamWriter streamWriter
           
 
Constructor Summary
StaxStreamContentHandler(javax.xml.stream.XMLStreamWriter streamWriter)
          Constructs a new instance of the StaxStreamContentHandler that writes to the given XMLStreamWriter.
 
Method Summary
protected  void charactersInternal(char[] ch, int start, int length)
           
protected  void endDocumentInternal()
           
protected  void endElementInternal(javax.xml.namespace.QName name, SimpleNamespaceContext namespaceContext)
           
protected  void ignorableWhitespaceInternal(char[] ch, int start, int length)
           
protected  void processingInstructionInternal(java.lang.String target, java.lang.String data)
           
 void setDocumentLocator(org.xml.sax.Locator locator)
           
protected  void skippedEntityInternal(java.lang.String name)
           
protected  void startDocumentInternal()
           
protected  void startElementInternal(javax.xml.namespace.QName name, org.xml.sax.Attributes attributes, SimpleNamespaceContext namespaceContext)
           
 
Methods inherited from class org.springframework.util.xml.AbstractStaxContentHandler
characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, skippedEntity, startDocument, startElement, startPrefixMapping, toQName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

streamWriter

private final javax.xml.stream.XMLStreamWriter streamWriter
Constructor Detail

StaxStreamContentHandler

StaxStreamContentHandler(javax.xml.stream.XMLStreamWriter streamWriter)
Constructs a new instance of the StaxStreamContentHandler that writes to the given XMLStreamWriter.

Parameters:
streamWriter - the stream writer to write to
Method Detail

setDocumentLocator

public void setDocumentLocator(org.xml.sax.Locator locator)

charactersInternal

protected void charactersInternal(char[] ch,
                                  int start,
                                  int length)
                           throws javax.xml.stream.XMLStreamException
Specified by:
charactersInternal in class AbstractStaxContentHandler
Throws:
javax.xml.stream.XMLStreamException

endDocumentInternal

protected void endDocumentInternal()
                            throws javax.xml.stream.XMLStreamException
Specified by:
endDocumentInternal in class AbstractStaxContentHandler
Throws:
javax.xml.stream.XMLStreamException

endElementInternal

protected void endElementInternal(javax.xml.namespace.QName name,
                                  SimpleNamespaceContext namespaceContext)
                           throws javax.xml.stream.XMLStreamException
Specified by:
endElementInternal in class AbstractStaxContentHandler
Throws:
javax.xml.stream.XMLStreamException

ignorableWhitespaceInternal

protected void ignorableWhitespaceInternal(char[] ch,
                                           int start,
                                           int length)
                                    throws javax.xml.stream.XMLStreamException
Specified by:
ignorableWhitespaceInternal in class AbstractStaxContentHandler
Throws:
javax.xml.stream.XMLStreamException

processingInstructionInternal

protected void processingInstructionInternal(java.lang.String target,
                                             java.lang.String data)
                                      throws javax.xml.stream.XMLStreamException
Specified by:
processingInstructionInternal in class AbstractStaxContentHandler
Throws:
javax.xml.stream.XMLStreamException

skippedEntityInternal

protected void skippedEntityInternal(java.lang.String name)
Specified by:
skippedEntityInternal in class AbstractStaxContentHandler

startDocumentInternal

protected void startDocumentInternal()
                              throws javax.xml.stream.XMLStreamException
Specified by:
startDocumentInternal in class AbstractStaxContentHandler
Throws:
javax.xml.stream.XMLStreamException

startElementInternal

protected void startElementInternal(javax.xml.namespace.QName name,
                                    org.xml.sax.Attributes attributes,
                                    SimpleNamespaceContext namespaceContext)
                             throws javax.xml.stream.XMLStreamException
Specified by:
startElementInternal in class AbstractStaxContentHandler
Throws:
javax.xml.stream.XMLStreamException