Examples of ChunkingEventReader


Examples of org.jasig.portal.xml.stream.ChunkingEventReader

            throw new RuntimeException("Failed to create XMLEventWriter", e);
        }
       
        //Add the chunking wrapper to the XMLEventReader
        final XMLEventReader xmlEventReader = eventReader.getEventReader();
        final ChunkingEventReader chunkingEventReader = new ChunkingEventReader(request,
                this.chunkingElements, this.chunkingPatternEventSources, this.chunkingPatterns,
                xmlEventReader, xmlEventWriter, writer);
       
        try {
            xmlEventWriter.add(chunkingEventReader);
            xmlEventWriter.flush();
            xmlEventWriter.close();
            chunkingEventReader.close();
        }
        catch (XMLStreamException e) {
            throw new RuntimeException("Failed to write events to Writer", e);
        }
       
        //Return the chunked data
        final List<CharacterEvent> characterEvents = chunkingEventReader.getCharacterEvents();
        final CharacterEventBufferReader characterEventReader = new CharacterEventBufferReader(characterEvents.listIterator());
        final Map<String, String> outputProperties = eventReader.getOutputProperties();
        return new PipelineEventReaderImpl<CharacterEventReader, CharacterEvent>(characterEventReader, outputProperties);
    }
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.