org.apache.axiom.util.stax.wrapper
Class WrappingXMLOutputFactory

java.lang.Object
  extended by javax.xml.stream.XMLOutputFactory
      extended by org.apache.axiom.util.stax.wrapper.XMLOutputFactoryWrapper
          extended by org.apache.axiom.util.stax.wrapper.WrappingXMLOutputFactory

public class WrappingXMLOutputFactory
extends XMLOutputFactoryWrapper

XMLOutputFactory wrapper that wraps all XMLEventWriter and XMLStreamWriter instances created from it.


Field Summary
 
Fields inherited from class javax.xml.stream.XMLOutputFactory
IS_REPAIRING_NAMESPACES
 
Constructor Summary
WrappingXMLOutputFactory(XMLOutputFactory parent)
          Constructor.
 
Method Summary
 XMLEventWriter createXMLEventWriter(OutputStream stream)
           
 XMLEventWriter createXMLEventWriter(OutputStream stream, String encoding)
           
 XMLEventWriter createXMLEventWriter(Result result)
           
 XMLEventWriter createXMLEventWriter(Writer stream)
           
 XMLStreamWriter createXMLStreamWriter(OutputStream stream)
           
 XMLStreamWriter createXMLStreamWriter(OutputStream stream, String encoding)
           
 XMLStreamWriter createXMLStreamWriter(Result result)
           
 XMLStreamWriter createXMLStreamWriter(Writer stream)
           
protected  XMLEventWriter wrap(XMLEventWriter writer)
          Wrap a writer created from this factory.
protected  XMLStreamWriter wrap(XMLStreamWriter writer)
          Wrap a writer created from this factory.
 
Methods inherited from class org.apache.axiom.util.stax.wrapper.XMLOutputFactoryWrapper
getProperty, isPropertySupported, setProperty
 
Methods inherited from class javax.xml.stream.XMLOutputFactory
newFactory, newFactory, newInstance, newInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WrappingXMLOutputFactory

public WrappingXMLOutputFactory(XMLOutputFactory parent)
Constructor.

Parameters:
parent - the parent factory
Method Detail

wrap

protected XMLEventWriter wrap(XMLEventWriter writer)
Wrap a writer created from this factory. Implementations should override this method if they which to wrap XMLEventWriter instances created from the factory. The default implementation simply returns the unwrapped writer.

Parameters:
writer - the writer to wrap
Returns:
the wrapped writer

wrap

protected XMLStreamWriter wrap(XMLStreamWriter writer)
Wrap a writer created from this factory. Implementations should override this method if they which to wrap XMLStreamWriter instances created from the factory. The default implementation simply returns the unwrapped writer.

Parameters:
writer - the writer to wrap
Returns:
the wrapped writer

createXMLEventWriter

public XMLEventWriter createXMLEventWriter(OutputStream stream,
                                           String encoding)
                                    throws XMLStreamException
Overrides:
createXMLEventWriter in class XMLOutputFactoryWrapper
Throws:
XMLStreamException

createXMLEventWriter

public XMLEventWriter createXMLEventWriter(OutputStream stream)
                                    throws XMLStreamException
Overrides:
createXMLEventWriter in class XMLOutputFactoryWrapper
Throws:
XMLStreamException

createXMLEventWriter

public XMLEventWriter createXMLEventWriter(Result result)
                                    throws XMLStreamException
Overrides:
createXMLEventWriter in class XMLOutputFactoryWrapper
Throws:
XMLStreamException

createXMLEventWriter

public XMLEventWriter createXMLEventWriter(Writer stream)
                                    throws XMLStreamException
Overrides:
createXMLEventWriter in class XMLOutputFactoryWrapper
Throws:
XMLStreamException

createXMLStreamWriter

public XMLStreamWriter createXMLStreamWriter(OutputStream stream,
                                             String encoding)
                                      throws XMLStreamException
Overrides:
createXMLStreamWriter in class XMLOutputFactoryWrapper
Throws:
XMLStreamException

createXMLStreamWriter

public XMLStreamWriter createXMLStreamWriter(OutputStream stream)
                                      throws XMLStreamException
Overrides:
createXMLStreamWriter in class XMLOutputFactoryWrapper
Throws:
XMLStreamException

createXMLStreamWriter

public XMLStreamWriter createXMLStreamWriter(Result result)
                                      throws XMLStreamException
Overrides:
createXMLStreamWriter in class XMLOutputFactoryWrapper
Throws:
XMLStreamException

createXMLStreamWriter

public XMLStreamWriter createXMLStreamWriter(Writer stream)
                                      throws XMLStreamException
Overrides:
createXMLStreamWriter in class XMLOutputFactoryWrapper
Throws:
XMLStreamException


Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.