Package org.apache.jackrabbit.vault.util.xml.serialize

Examples of org.apache.jackrabbit.vault.util.xml.serialize.OutputFormat


        }
    }
    */

    public void save(OutputStream out) throws IOException {
        OutputFormat fmt = new OutputFormat("xml", "UTF-8", true);
        fmt.setLineWidth(0);
        fmt.setIndent(2);
        XMLSerializer ser = new XMLSerializer(out, fmt);
        try {
            write(ser);
        } catch (SAXException e) {
            throw new IOException(e.toString());
View Full Code Here


    /**
     * {@inheritDoc}
     */
    public void writeContent(OutputStream out) throws IOException, RepositoryException {
        // build content handler and add filter in case of original xml files
        OutputFormat oFmt = new OutputFormat("xml", "UTF-8", true);
        oFmt.setIndent(4);
        oFmt.setLineWidth(0);
        oFmt.setBreakEachAttribute(true);
        XMLSerializer ser = new XMLSerializer(out, oFmt);
        DocViewSAXFormatter fmt = new DocViewSAXFormatter(aggregate, ser);
        fmt.setUseJcrRoot(true);
        aggregate.walk(fmt);
    }
View Full Code Here


    private void generateSource() {
        try {
            ByteArrayOutputStream out = new ByteArrayOutputStream();
            XMLSerializer ser = new XMLSerializer(out, new OutputFormat("xml", "UTF-8", true));
            ser.startDocument();
            AttributesImpl attrs = new AttributesImpl();
            attrs.addAttribute(null, null, ATTR_VERSION, "CDATA", String.valueOf(version));
            ser.startElement(null, null, "workspaceFilter", attrs);
            for (PathFilterSet set: filterSets) {
View Full Code Here

    public void save(File configFile) throws IOException {
        save(FileUtils.openOutputStream(configFile));
    }
   
    public void save(OutputStream out) throws IOException {
        OutputFormat fmt = new OutputFormat("xml", "UTF-8", true);
        fmt.setLineWidth(0);
        fmt.setIndent(2);
        XMLSerializer ser = new XMLSerializer(out, fmt);
        try {
            write(ser);
        } catch (SAXException e) {
            throw new IOException(e.toString());
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.vault.util.xml.serialize.OutputFormat

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.