Examples of releaseParserOnClose()


Examples of org.apache.axiom.om.impl.builder.StAXOMBuilder.releaseParserOnClose()

        XMLStreamReader xmlReader = StAXUtils
                .createXMLStreamReader(reader);
        OMFactory fac = OMAbstractFactory.getOMFactory();
        StAXOMBuilder builder = new StAXOMBuilder(fac, xmlReader);
        builder.setCache(true);
        builder.releaseParserOnClose(true);
        OMNode omNode = builder.getDocumentElement();
       
        if (buildAll) {
            omNode.build();
            builder.close();
View Full Code Here

Examples of org.apache.axiom.om.impl.builder.StAXOMBuilder.releaseParserOnClose()

     * @throws XMLStreamException
     */
    private static void reader2writer(XMLStreamReader reader,
                                     XMLStreamWriter writer) throws XMLStreamException {
        StAXOMBuilder builder = new StAXOMBuilder(reader);
        builder.releaseParserOnClose(true);
        try {
            OMDocument omDocument = builder.getDocument();
            Iterator it = omDocument.getChildren();
            while (it.hasNext()) {
                // TODO: this is extremely inefficient since next() will actually build the node!
View Full Code Here

Examples of org.apache.axiom.om.impl.builder.StAXOMBuilder.releaseParserOnClose()

     * @throws XMLStreamException
     */
    private static void reader2writer(XMLStreamReader reader,
                                     XMLStreamWriter writer) throws XMLStreamException {
        StAXOMBuilder builder = new StAXOMBuilder(reader);
        builder.releaseParserOnClose(true);
        try {
            OMDocument omDocument = builder.getDocument();
            Iterator it = omDocument.getChildren();
            while (it.hasNext()) {
                // TODO: this is extremely inefficient since next() will actually build the node!
View Full Code Here

Examples of org.apache.axiom.om.impl.builder.StAXOMBuilder.releaseParserOnClose()

     */
    public static void reader2writer(XMLStreamReader reader,
                                     XMLStreamWriter writer)
    throws XMLStreamException {
        StAXOMBuilder builder = new StAXOMBuilder(reader);
        builder.releaseParserOnClose(true);
        try {
            OMDocument omDocument = builder.getDocument();
            Iterator it = omDocument.getChildren();
            while (it.hasNext()) {
                OMNode omNode = (OMNode) it.next();
View Full Code Here

Examples of org.apache.axiom.om.impl.builder.StAXOMBuilder.releaseParserOnClose()

        StAXOMBuilder builder = new StAXOMBuilder(omFactory, parser);
        // StAXOMBuilder defaults to the "legacy" behavior, which is to keep a reference to the
        // parser after the builder has been closed. Since releasing this reference is a good idea
        // we default to releaseParserOnClose=true for builders created through the OMMetaFactory
        // API.
        builder.releaseParserOnClose(true);
        return builder;
    }

    public OMXMLParserWrapper createStAXOMBuilder(OMFactory omFactory, XMLStreamReader parser) {
        return internalCreateStAXOMBuilder(omFactory, getXMLStreamReader(parser));
View Full Code Here

Examples of org.apache.axiom.om.impl.builder.StAXOMBuilder.releaseParserOnClose()

     */
    public static void reader2writer(XMLStreamReader reader,
                                     XMLStreamWriter writer)
    throws XMLStreamException {
        StAXOMBuilder builder = new StAXOMBuilder(reader);
        builder.releaseParserOnClose(true);
        try {
            OMDocument omDocument = builder.getDocument();
            Iterator it = omDocument.getChildren();
            while (it.hasNext()) {
                OMNode omNode = (OMNode) it.next();
View Full Code Here

Examples of org.apache.axiom.om.impl.builder.StAXOMBuilder.releaseParserOnClose()

     * @throws XMLStreamException
     */
    private static void reader2writer(XMLStreamReader reader,
                                     XMLStreamWriter writer) throws XMLStreamException {
        StAXOMBuilder builder = new StAXOMBuilder(reader);
        builder.releaseParserOnClose(true);
        try {
            OMDocument omDocument = builder.getDocument();
            Iterator it = omDocument.getChildren();
            while (it.hasNext()) {
                OMNode omNode = (OMNode) it.next();
View Full Code Here

Examples of org.apache.axiom.om.impl.builder.XOPAwareStAXOMBuilder.releaseParserOnClose()

    public OMXMLParserWrapper createOMBuilder(StAXParserConfiguration configuration,
            OMFactory omFactory, InputSource rootPart, MimePartProvider mimePartProvider) {
        XOPAwareStAXOMBuilder builder = new XOPAwareStAXOMBuilder(omFactory, createXMLStreamReader(
                configuration, rootPart), mimePartProvider);
        builder.releaseParserOnClose(true);
        return builder;
    }

    private SOAPModelBuilder internalCreateStAXSOAPModelBuilder(XMLStreamReader parser) {
        StAXSOAPModelBuilder builder = new StAXSOAPModelBuilder(this, parser);
View Full Code Here

Examples of org.apache.axiom.om.impl.builder.XOPAwareStAXOMBuilder.releaseParserOnClose()

    public OMXMLParserWrapper createOMBuilder(StAXParserConfiguration configuration,
            OMFactory omFactory, InputSource rootPart, MimePartProvider mimePartProvider) {
        XOPAwareStAXOMBuilder builder = new XOPAwareStAXOMBuilder(omFactory, createXMLStreamReader(
                configuration, rootPart), mimePartProvider);
        builder.releaseParserOnClose(true);
        return builder;
    }

    private SOAPModelBuilder internalCreateStAXSOAPModelBuilder(XMLStreamReader parser) {
        StAXSOAPModelBuilder builder = new StAXSOAPModelBuilder(this, parser);
View Full Code Here

Examples of org.apache.axiom.om.impl.llom.OMStAXWrapper.releaseParserOnClose()

           
            // Make sure the reader is an OMStAXWrapper
            if (reader instanceof OMStAXWrapper) {
                OMStAXWrapper wrapper = (OMStAXWrapper) reader;
                assertTrue(!wrapper.isClosed());
                wrapper.releaseParserOnClose(true);
            }
           
            int count = 0;
            while (reader.hasNext()) {
                reader.next();
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.