Apache CXF API

org.apache.cxf.jaxrs.provider
Class XMLBeanStreamSerializer

java.lang.Object
  extended by org.apache.cxf.jaxrs.provider.XMLBeanStreamSerializer

public class XMLBeanStreamSerializer
extends Object

Serializes an XMLBean data object to an XML stream Note: uses an intermediate file created by File.createTempFile(String, String) as I couldn't work out how to fit a normal stream into an event driven XML stream.


Constructor Summary
XMLBeanStreamSerializer()
           
 
Method Summary
 void serialize(org.apache.xmlbeans.XmlObject xObj, javax.xml.stream.XMLStreamWriter writer)
          Serialize the given XML data object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLBeanStreamSerializer

public XMLBeanStreamSerializer()
Method Detail

serialize

public void serialize(org.apache.xmlbeans.XmlObject xObj,
                      javax.xml.stream.XMLStreamWriter writer)
               throws IOException,
                      javax.xml.stream.XMLStreamException
Serialize the given XML data object. Writes the data object to a temporary file then reads it back in with an XMLStreamReader. This allows the events from the reader to drive the output to the XMLStreamWriter. Probably not the best way to do this.

Parameters:
obj -
writer -
Throws:
IOException
javax.xml.stream.XMLStreamException

Apache CXF API

Apache CXF