org.apache.cxf.jaxrs.provider.xmlbeans
Class XMLBeanStreamSerializer
java.lang.Object
org.apache.cxf.jaxrs.provider.xmlbeans.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.
Method Summary |
void |
serialize(org.apache.xmlbeans.XmlObject xObj,
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 |
XMLBeanStreamSerializer
public XMLBeanStreamSerializer()
serialize
public void serialize(org.apache.xmlbeans.XmlObject xObj,
XMLStreamWriter writer)
throws IOException,
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
XMLStreamException
Apache CXF