Package javanet.staxutils

Examples of javanet.staxutils.IndentingXMLEventWriter


     * writer.
     */
    private XMLEventWriter createXmlEventWriter(FileWriter fileWriter)
            throws FactoryConfigurationError, XMLStreamException {
        XMLOutputFactory factory = XMLOutputFactory.newInstance();
        return new IndentingXMLEventWriter(factory
                .createXMLEventWriter(fileWriter));
    }
View Full Code Here


        try {
            out = new FileWriter(parameters.get(PARAMETER_JOURNAL_FILENAME));

            XMLOutputFactory factory = XMLOutputFactory.newInstance();
            writer =
                    new IndentingXMLEventWriter(factory
                            .createXMLEventWriter(out));
        } catch (IOException e) {
            throw new JournalException(e);
        } catch (XMLStreamException e) {
            throw new JournalException(e);
View Full Code Here

        try {
            super.testStateChange(State.FILE_OPEN);

            writer = new RmiTransportWriter(receiver, repositoryHash, filename);
            xmlWriter =
                    new IndentingXMLEventWriter(XMLOutputFactory
                            .newInstance()
                            .createXMLEventWriter(new BufferedWriter(writer,
                                                                     bufferSize)));

            parent.writeDocumentHeader(xmlWriter, repositoryHash, currentDate);
View Full Code Here

    /**
     * Wrap an XMLEventWriter around that StringWriter.
     */
    private XMLEventWriter createXmlEventWriter(StringWriter stringWriter)
            throws FactoryConfigurationError, XMLStreamException {
        return new IndentingXMLEventWriter(XMLOutputFactory.newInstance()
                .createXMLEventWriter(stringWriter));
    }
View Full Code Here

            super.testStateChange(State.FILE_OPEN);

            journalFile = new TransportOutputFile(directory, filename);

            xmlWriter =
                    new IndentingXMLEventWriter(XMLOutputFactory.newInstance()
                            .createXMLEventWriter(journalFile.open()));

            parent.writeDocumentHeader(xmlWriter, repositoryHash, currentDate);

            super.setState(State.FILE_OPEN);
View Full Code Here

    }

    private XMLEventWriter createXmlWriter() throws FactoryConfigurationError,
            XMLStreamException {
        XMLOutputFactory factory = XMLOutputFactory.newInstance();
        return new IndentingXMLEventWriter(factory
                .createXMLEventWriter(xmlStringWriter));
    }
View Full Code Here

        this.filename = filename;
        this.currentDate = currentDate;
        try {
            stringWriter = new StringWriter();
            xmlWriter =
                    new IndentingXMLEventWriter(XMLOutputFactory.newInstance()
                            .createXMLEventWriter(stringWriter));
        } catch (XMLStreamException e) {
            throw new JournalException(e);
        } catch (FactoryConfigurationError e) {
            throw new JournalException(e);
View Full Code Here

                new JournalEntrySizeEstimator(mjw);

        for (CreatorJournalEntry journalEntry : journalEntries) {
            StringWriter stringWriter = new StringWriter();
            XMLEventWriter xmlEventWriter =
                    new IndentingXMLEventWriter(XMLOutputFactory.newInstance()
                            .createXMLEventWriter(stringWriter));
            mjw.writeJournalEntry(journalEntry, xmlEventWriter);
            long estimatedSize = estimator.estimateSize(journalEntry);
            assertSizesAreReallyClose(stringWriter.getBuffer().length(),
                                      estimatedSize);
View Full Code Here

                             String role,
                             ServerInterface server)
            throws XMLStreamException, FactoryConfigurationError {
        super(parameters, role, server);
        xmlWriter =
                new IndentingXMLEventWriter(XMLOutputFactory.newInstance()
                        .createXMLEventWriter(stringWriter));
    }
View Full Code Here

TOP

Related Classes of javanet.staxutils.IndentingXMLEventWriter

Copyright © 2018 www.massapicom. 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.