@Beta public abstract class AbstractXmlHttpContent extends AbstractHttpContent
Beta Implementation is not thread-safe.
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractXmlHttpContent(XmlNamespaceDictionary namespaceDictionary) |
| Modifier and Type | Method and Description |
|---|---|
XmlNamespaceDictionary |
getNamespaceDictionary()
Returns the XML namespace dictionary.
|
AbstractXmlHttpContent |
setMediaType(HttpMediaType mediaType)
Sets the media type to use for the Content-Type header, or
null if unspecified. |
void |
writeTo(OutputStream out)
Writes the byte content to the given output stream.
|
protected abstract void |
writeTo(org.xmlpull.v1.XmlSerializer serializer)
Writes the content to the given XML serializer.
|
computeLength, computeLength, getCharset, getLength, getMediaType, getType, retrySupportedprotected AbstractXmlHttpContent(XmlNamespaceDictionary namespaceDictionary)
namespaceDictionary - XML namespace dictionarypublic final void writeTo(OutputStream out) throws IOException
StreamingContentImplementations must not close the output stream, and instead should flush the output stream. Some callers may assume that the the output stream has not been closed, and will fail to work if it has been closed.
out - output streamIOExceptionpublic AbstractXmlHttpContent setMediaType(HttpMediaType mediaType)
AbstractHttpContentnull 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.
setMediaType in class AbstractHttpContentpublic final XmlNamespaceDictionary getNamespaceDictionary()
protected abstract void writeTo(org.xmlpull.v1.XmlSerializer serializer)
throws IOException
IOException - I/O exceptionCopyright © 2011-2013 Google. All Rights Reserved.