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.
Constructors
AbstractXmlHttpContent(XmlNamespaceDictionary namespaceDictionary)
protected AbstractXmlHttpContent(XmlNamespaceDictionary namespaceDictionary)
Name | Description |
namespaceDictionary | XmlNamespaceDictionary XML namespace dictionary |
Methods
getNamespaceDictionary()
public final XmlNamespaceDictionary getNamespaceDictionary()
Returns the XML namespace dictionary.
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.
Name | Description |
mediaType | HttpMediaType |
Type | Description |
AbstractXmlHttpContent |
writeTo(OutputStream out)
public final void writeTo(OutputStream out)
Name | Description |
out | OutputStream |
Type | Description |
IOException |
writeTo(XmlSerializer serializer)
protected abstract void writeTo(XmlSerializer serializer)
Writes the content to the given XML serializer.
Name | Description |
serializer | org.xmlpull.v1.XmlSerializer |
Type | Description |
IOException | I/O exception |