@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,
java.lang.String elementName,
java.lang.Object data)
XML namespace dictionary.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getData()
Returns the key/value pair data.
|
java.lang.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, java.lang.String elementName, java.lang.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 java.io.IOException
AbstractXmlHttpContentwriteTo in class AbstractXmlHttpContentjava.io.IOException - I/O exceptionpublic XmlHttpContent setMediaType(HttpMediaType mediaType)
setMediaType in class AbstractXmlHttpContentpublic final java.lang.String getElementName()
"atom:entry".public final java.lang.Object getData()
Copyright © 2011-2018 Google. All Rights Reserved.