@Beta public class XmlHttpContent extends AbstractXmlHttpContent
Beta Sample usage:
static void setContent(HttpRequest request, XmlNamespaceDictionary namespaceDictionary,
String elementName, Object data) {
request.setContent(new XmlHttpContent(namespaceDictionary, elementName, data));
}
Implementation is not thread-safe.
| Constructor and Description |
|---|
XmlHttpContent(XmlNamespaceDictionary namespaceDictionary,
String elementName,
Object data)
XML namespace dictionary.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
getData()
Returns the key/value pair data.
|
String |
getElementName()
Returns the XML element local name, optionally prefixed by its namespace alias, for example
"atom:entry". |
XmlHttpContent |
setMediaType(HttpMediaType mediaType) |
void |
writeTo(org.xmlpull.v1.XmlSerializer serializer)
Writes the content to the given XML serializer.
|
getNamespaceDictionary, writeTocomputeLength, computeLength, getCharset, getLength, getMediaType, getType, retrySupportedpublic XmlHttpContent(XmlNamespaceDictionary namespaceDictionary, String elementName, Object data)
namespaceDictionary - XML namespace dictionaryelementName - XML element local name, optionally prefixed by its namespace alias, for
example "atom:entry"data - Key/value pair datapublic final void writeTo(org.xmlpull.v1.XmlSerializer serializer)
throws IOException
AbstractXmlHttpContentwriteTo in class AbstractXmlHttpContentIOException - I/O exceptionpublic XmlHttpContent setMediaType(HttpMediaType mediaType)
setMediaType in class AbstractXmlHttpContentpublic final String getElementName()
"atom:entry".public final Object getData()
Copyright © 2011-2015 Google. All Rights Reserved.