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
NameDescription
namespaceDictionaryXmlNamespaceDictionary

XML namespace dictionary

Methods

getNamespaceDictionary()

public final XmlNamespaceDictionary getNamespaceDictionary()

Returns the XML namespace dictionary.

Returns
TypeDescription
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
NameDescription
mediaTypeHttpMediaType
Returns
TypeDescription
AbstractXmlHttpContent
Overrides

writeTo(OutputStream out)

public final void writeTo(OutputStream out)
Parameter
NameDescription
outOutputStream
Exceptions
TypeDescription
IOException

writeTo(XmlSerializer serializer)

protected abstract void writeTo(XmlSerializer serializer)

Writes the content to the given XML serializer.

Parameter
NameDescription
serializerorg.xmlpull.v1.XmlSerializer
Exceptions
TypeDescription
IOException

I/O exception