Package org.apache.xmlrpc.serializer
Class DefaultXMLWriterFactory
java.lang.Object
org.apache.xmlrpc.serializer.DefaultXMLWriterFactory
- All Implemented Interfaces:
XmlWriterFactory
The default implementation of
XmlWriterFactory
tests, whether the CharSetXmlWriterFactory
is usable. This is the case, when running in Java 1.4 or later. If so,
this factory is used. Otherwise, the
BaseXmlWriterFactory
is used as a
fallback.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetXmlWriter
(XmlRpcStreamConfig pConfig, OutputStream pStream) Creates a new instance ofContentHandler
, writing to the givenOutputStream
.
-
Field Details
-
factory
-
-
Constructor Details
-
DefaultXMLWriterFactory
public DefaultXMLWriterFactory()Creates a new instance.
-
-
Method Details
-
getXmlWriter
public ContentHandler getXmlWriter(XmlRpcStreamConfig pConfig, 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.
-