Examples of XMLStreamWriterWithOS


Examples of org.apache.axis2.jaxws.message.util.XMLStreamWriterWithOS

    public byte[] getXMLBytes(String encoding) throws UnsupportedEncodingException {
        try {
            ByteArrayOutputStream baos = new ByteArrayOutputStream();

            // Exposes getOutputStream, which allows faster writes.
            XMLStreamWriterWithOS writer = new XMLStreamWriterWithOS(baos, encoding);

            // Write the business object to the writer
            serialize(writer);

            // Flush the writer
            writer.flush();
            writer.close();
            return baos.toByteArray();
        } catch (XMLStreamException e) {
            throw new OMException(e);
        }
    }
View Full Code Here

Examples of org.apache.axis2.jaxws.message.util.XMLStreamWriterWithOS

    private byte[] _getBytesFromBO(Object busObj, Object busContext, String encoding)
        throws XMLStreamException, WebServiceException {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();

        // Exposes getOutputStream, which allows faster writes.
        XMLStreamWriterWithOS writer = new XMLStreamWriterWithOS(baos, encoding);

        // Write the business object to the writer
        _outputFromBO(busObj, busContext, writer);

        // Flush the writer
        writer.flush();
        writer.close();
        return baos.toByteArray();
    }
View Full Code Here

Examples of org.apache.axis2.jaxws.message.util.XMLStreamWriterWithOS

    public byte[] getXMLBytes(String encoding) throws UnsupportedEncodingException {
        try {
            ByteArrayOutputStream baos = new ByteArrayOutputStream();

            // Exposes getOutputStream, which allows faster writes.
            XMLStreamWriterWithOS writer = new XMLStreamWriterWithOS(baos, encoding);

            // Write the business object to the writer
            serialize(writer);

            // Flush the writer
            writer.flush();
            writer.close();
            return baos.toByteArray();
        } catch (XMLStreamException e) {
            throw new OMException(e);
        }
    }
View Full Code Here

Examples of org.apache.axis2.jaxws.message.util.XMLStreamWriterWithOS

    private byte[] _getBytesFromBO(Object busObj, Object busContext, String encoding)
        throws XMLStreamException, WebServiceException {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();

        // Exposes getOutputStream, which allows faster writes.
        XMLStreamWriterWithOS writer = new XMLStreamWriterWithOS(baos, encoding);

        // Write the business object to the writer
        _outputFromBO(busObj, busContext, writer);

        // Flush the writer
        writer.flush();
        writer.close();
        return baos.toByteArray();
    }
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.