Class AbstractXmlHttpContent (1.43.2)

public abstract class AbstractXmlHttpContent extends AbstractHttpContent

Beta
Abstract serializer for XML HTTP content based on the data key/value mapping object for an item.

Implementation is not thread-safe.

Inheritance

java.lang.Object > AbstractHttpContent > AbstractXmlHttpContent

Constructors

AbstractXmlHttpContent(XmlNamespaceDictionary namespaceDictionary)

protected AbstractXmlHttpContent(XmlNamespaceDictionary namespaceDictionary)
Parameter
Name Description
namespaceDictionary XmlNamespaceDictionary

XML namespace dictionary

Methods

getNamespaceDictionary()

public final XmlNamespaceDictionary getNamespaceDictionary()

Returns the XML namespace dictionary.

Returns
Type Description
XmlNamespaceDictionary

setMediaType(HttpMediaType mediaType)

public AbstractXmlHttpContent setMediaType(HttpMediaType mediaType)

Sets the media type to use for the Content-Type header, or null if unspecified.

This will also overwrite any previously set parameter of the media type (for example "charset"), and therefore might change other properties as well.

Parameter
Name Description
mediaType HttpMediaType
Returns
Type Description
AbstractXmlHttpContent
Overrides

writeTo(OutputStream out)

public final void writeTo(OutputStream out)
Parameter
Name Description
out OutputStream
Exceptions
Type Description
IOException

writeTo(XmlSerializer serializer)

protected abstract void writeTo(XmlSerializer serializer)

Writes the content to the given XML serializer.

Parameter
Name Description
serializer org.xmlpull.v1.XmlSerializer
Exceptions
Type Description
IOException

I/O exception