Class AbstractXmlHttpContent

    • Constructor Detail

      • AbstractXmlHttpContent

        protected AbstractXmlHttpContent​(XmlNamespaceDictionary namespaceDictionary)
        Parameters:
        namespaceDictionary - XML namespace dictionary
        Since:
        1.5
    • Method Detail

      • writeTo

        public final void writeTo​(OutputStream out)
                           throws IOException
        Description copied from interface: StreamingContent
        Writes the byte content to the given output stream.

        Implementations 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.

        Parameters:
        out - output stream
        Throws:
        IOException
      • setMediaType

        public AbstractXmlHttpContent setMediaType​(HttpMediaType mediaType)
        Description copied from class: AbstractHttpContent
        Sets the media type to use for the Content-Type header, or 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.

        Overrides:
        setMediaType in class AbstractHttpContent
      • getNamespaceDictionary

        public final XmlNamespaceDictionary getNamespaceDictionary()
        Returns the XML namespace dictionary.
        Since:
        1.5
      • writeTo

        protected abstract void writeTo​(org.xmlpull.v1.XmlSerializer serializer)
                                 throws IOException
        Writes the content to the given XML serializer.
        Throws:
        IOException - I/O exception