Class MTOMXMLStreamWriter

  • All Implemented Interfaces:
    XMLStreamWriter

    public abstract class MTOMXMLStreamWriter
    extends Object
    implements XMLStreamWriter
    MTOMXMLStreamWriter is an XML + Attachments stream writer. For the moment this assumes that transport takes the decision of whether to optimize or not by looking at whether the MTOM optimize is enabled and also looking at the OM tree whether it has any optimizable content.
    • Constructor Detail

      • MTOMXMLStreamWriter

        public MTOMXMLStreamWriter()
    • Method Detail

      • getCharSetEncoding

        public abstract String getCharSetEncoding()
        Returns the character set encoding scheme. If the value of the charSetEncoding is not set then the default will be returned.
        Returns:
        Returns encoding.
      • getOutputFormat

        public abstract OMOutputFormat getOutputFormat()
        Get the output format used by this writer.

        The caller should use the returned instance in a read-only way, i.e. he should not modify the settings of the output format. Any attempt to do so will lead to unpredictable results.

        Returns:
        the output format used by this writer
      • getOutputStream

        public abstract OutputStream getOutputStream()
                                              throws XMLStreamException
        Get the underlying OutputStream for this writer, if available. This method allows a node (perhaps an OMSourcedElement) to write its content directly to the byte stream.

        WARNING: This method should be used with extreme care. The caller must be prepared to handle the following issues:

        • The caller must use the right charset encoding when writing to the stream.
        • The caller should avoid writing byte order marks to the stream.
        • The caller must be aware of the fact that a default namespace might have been set in the context where the byte stream is requested. If the XML data written to the stream contains unqualified elements, then the caller must make sure that the default namespace is redeclared as appropriate.
        Returns:
        the underlying byte stream, or null if the stream is not accessible
        Throws:
        XMLStreamException