com.atlassian.confluence.content.render.xhtml
Class DefaultXmlStreamWriterTemplate

java.lang.Object
  extended by com.atlassian.confluence.content.render.xhtml.DefaultXmlStreamWriterTemplate
All Implemented Interfaces:
XmlStreamWriterTemplate

public class DefaultXmlStreamWriterTemplate
extends java.lang.Object
implements XmlStreamWriterTemplate

Encapsulates the boiler plate around creating a stream writer.


Constructor Summary
DefaultXmlStreamWriterTemplate(javax.xml.stream.XMLOutputFactory xmlFragmentOutputFactory)
           
 
Method Summary
 void execute(java.io.Writer writer, XmlStreamWriterCallback callback)
          Executes the specified callback and writes to the provided writer.
 java.lang.String execute(XmlStreamWriterCallback callback)
          Executes the specified callback and returns a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultXmlStreamWriterTemplate

public DefaultXmlStreamWriterTemplate(javax.xml.stream.XMLOutputFactory xmlFragmentOutputFactory)
Method Detail

execute

public java.lang.String execute(XmlStreamWriterCallback callback)
                         throws javax.xml.stream.XMLStreamException,
                                XhtmlException
Description copied from interface: XmlStreamWriterTemplate
Executes the specified callback and returns a string.

Specified by:
execute in interface XmlStreamWriterTemplate
Parameters:
callback - the stream writer will be exposed to this callback for writing
Returns:
what was written to the stream writer as a string
Throws:
javax.xml.stream.XMLStreamException
XhtmlException

execute

public void execute(java.io.Writer writer,
                    XmlStreamWriterCallback callback)
             throws javax.xml.stream.XMLStreamException,
                    java.io.IOException
Description copied from interface: XmlStreamWriterTemplate
Executes the specified callback and writes to the provided writer.

Specified by:
execute in interface XmlStreamWriterTemplate
Parameters:
writer - the writer to which the output should be sent
callback - the stream writer will be exposed to this callback for writing
Throws:
javax.xml.stream.XMLStreamException
java.io.IOException


Copyright © 2003-2014 Atlassian. All Rights Reserved.