public abstract class AbstractXmlHttpContent extends AbstractHttpContent
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 content to the given output stream.
|
protected abstract void |
writeTo(org.xmlpull.v1.XmlSerializer serializer)
Writes the content to the given XML serializer.
|
computeLength, getCharset, getEncoding, getLength, getMediaType, getType, retrySupportedprotected AbstractXmlHttpContent(XmlNamespaceDictionary namespaceDictionary)
namespaceDictionary - XML namespace dictionarypublic final void writeTo(OutputStream out) throws IOException
HttpContentThe recommendation for implementations is that they should not close the output stream. Callers should not assume whether or not the output stream has been closed. Implementations that do not close the output stream should flush it at the end of the method.
IOExceptionpublic 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-2012 Google. All Rights Reserved.