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, retrySupported
protected AbstractXmlHttpContent(XmlNamespaceDictionary namespaceDictionary)
namespaceDictionary
- XML namespace dictionarypublic final void writeTo(OutputStream out) throws IOException
HttpContent
The 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.
IOException
public AbstractXmlHttpContent setMediaType(HttpMediaType mediaType)
AbstractHttpContent
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.
setMediaType
in class AbstractHttpContent
public final XmlNamespaceDictionary getNamespaceDictionary()
protected abstract void writeTo(org.xmlpull.v1.XmlSerializer serializer) throws IOException
IOException
- I/O exceptionCopyright © 2011-2012 Google. All Rights Reserved.