Examples of MTOMXMLStreamWriter


Examples of org.apache.axiom.om.impl.MTOMXMLStreamWriter

     * @param output
     * @param format
     * @throws XMLStreamException
     */
    public void serialize(OutputStream output, OMOutputFormat format) throws XMLStreamException {
        MTOMXMLStreamWriter writer = new MTOMXMLStreamWriter(output, format);
        internalSerialize(writer);
        writer.flush();
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.MTOMXMLStreamWriter

        internalSerialize(writer, true, includeXMLDeclaration);

    }

    protected void internalSerialize(XMLStreamWriter writer2, boolean cache, boolean includeXMLDeclaration) throws XMLStreamException {
        MTOMXMLStreamWriter writer = (MTOMXMLStreamWriter) writer2;
        if (includeXMLDeclaration) {
            //Check whether the OMOutput char encoding and OMDocument char
            //encoding matches, if not use char encoding of OMOutput
            String outputCharEncoding = writer.getCharSetEncoding();
            if (outputCharEncoding == null || "".equals(outputCharEncoding)) {
                writer.getXmlStreamWriter().writeStartDocument(charSetEncoding,
                        xmlVersion);
            } else {
                writer.getXmlStreamWriter().writeStartDocument(outputCharEncoding,
                        xmlVersion);
            }
        }

        Iterator children = this.getChildren();
View Full Code Here

Examples of org.apache.axiom.om.impl.MTOMXMLStreamWriter

        }
    }

    private void internalSerializeLocal(XMLStreamWriter writer2)
            throws XMLStreamException {
        MTOMXMLStreamWriter writer = (MTOMXMLStreamWriter) writer2;
        if (!this.isBinary) {
            writeOutput(writer);
        } else {
            if (writer.isOptimized()) {
                if (contentID == null) {
                    contentID = writer.getNextContentId();
                }
                // send binary as MTOM optimised
                this.attribute = new AttrImpl(this.ownerNode, "href",
                        new NamespaceImpl("", ""),
                        "cid:" + getContentID(),
                        this.factory);
                this.serializeStartpart(writer);
                writer.writeOptimized(this);
                writer.writeEndElement();
            } else {
                writer.writeCharacters(this.getText());
            }
        }
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.MTOMXMLStreamWriter

     *
     * @param xmlWriter
     * @throws javax.xml.stream.XMLStreamException
     */
    public void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException {
        MTOMXMLStreamWriter writer = new MTOMXMLStreamWriter(xmlWriter);
        internalSerialize(writer);
        writer.flush();
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.MTOMXMLStreamWriter

     * @param xmlWriter
     * @throws javax.xml.stream.XMLStreamException
     *
     */
    public void serializeAndConsume(XMLStreamWriter xmlWriter) throws XMLStreamException {
        MTOMXMLStreamWriter writer = new MTOMXMLStreamWriter(xmlWriter);
        internalSerializeAndConsume(writer);
        writer.flush();
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.MTOMXMLStreamWriter

    public void serializeAndConsume(Writer writer) throws XMLStreamException {
        serializeAndConsume(StAXUtils.createXMLStreamWriter(writer));
    }

    public void serialize(OutputStream output, OMOutputFormat format) throws XMLStreamException {
        MTOMXMLStreamWriter writer = new MTOMXMLStreamWriter(output, format);
        internalSerialize(writer);
        writer.flush();
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.MTOMXMLStreamWriter

        internalSerialize(writer);
        writer.flush();
    }

    public void serialize(Writer writer2, OMOutputFormat format) throws XMLStreamException {
        MTOMXMLStreamWriter writer = new MTOMXMLStreamWriter(StAXUtils.createXMLStreamWriter(writer2));
        writer.setOutputFormat(format);
        internalSerialize(writer);
        writer.flush();
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.MTOMXMLStreamWriter

        internalSerialize(writer);
        writer.flush();
    }

    public void serializeAndConsume(OutputStream output, OMOutputFormat format) throws XMLStreamException {
        MTOMXMLStreamWriter writer = new MTOMXMLStreamWriter(output, format);
        internalSerializeAndConsume(writer);
        writer.flush();
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.MTOMXMLStreamWriter

        internalSerializeAndConsume(writer);
        writer.flush();
    }

    public void serializeAndConsume(Writer writer2, OMOutputFormat format) throws XMLStreamException {
        MTOMXMLStreamWriter writer = new MTOMXMLStreamWriter(StAXUtils.createXMLStreamWriter(writer2));
        writer.setOutputFormat(format);
        internalSerializeAndConsume(writer);
        writer.flush();
    }
View Full Code Here

Examples of org.apache.axiom.om.impl.MTOMXMLStreamWriter

        this.ownerNode = document;
        this.isOwned(true);
    }

    public void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException {
        MTOMXMLStreamWriter writer = new MTOMXMLStreamWriter(xmlWriter);
        internalSerialize(writer);
        writer.flush();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.