Package org.apache.xmlrpc.serializer
Class DefaultXMLWriterFactory
- java.lang.Object
-
- org.apache.xmlrpc.serializer.DefaultXMLWriterFactory
-
- All Implemented Interfaces:
XmlWriterFactory
public class DefaultXMLWriterFactory extends java.lang.Object implements XmlWriterFactory
The default implementation ofXmlWriterFactory
tests, whether theCharSetXmlWriterFactory
is usable. This is the case, when running in Java 1.4 or later. If so, this factory is used. Otherwise, theBaseXmlWriterFactory
is used as a fallback.
-
-
Field Summary
Fields Modifier and Type Field Description private XmlWriterFactory
factory
-
Constructor Summary
Constructors Constructor Description DefaultXMLWriterFactory()
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.xml.sax.ContentHandler
getXmlWriter(XmlRpcStreamConfig pConfig, java.io.OutputStream pStream)
Creates a new instance ofContentHandler
, writing to the givenOutputStream
.
-
-
-
Field Detail
-
factory
private final XmlWriterFactory factory
-
-
Method Detail
-
getXmlWriter
public org.xml.sax.ContentHandler getXmlWriter(XmlRpcStreamConfig pConfig, java.io.OutputStream pStream) throws XmlRpcException
Description copied from interface:XmlWriterFactory
Creates a new instance ofContentHandler
, writing to the givenOutputStream
.- Specified by:
getXmlWriter
in interfaceXmlWriterFactory
- Parameters:
pConfig
- The request or response configuration.pStream
- The destination stream.- Returns:
- A SAX handler, typically an instance of
XMLWriter
. - Throws:
XmlRpcException
- Creating the handler failed.
-
-