/*
 * Decompiled with CFR 0_110.
 * 
 * Could not load the following classes:
 *  java.io.OutputStream
 *  java.io.UnsupportedEncodingException
 *  java.io.Writer
 *  javax.xml.transform.sax.SAXResult
 *  org.xml.sax.ContentHandler
 *  org.xml.sax.ext.LexicalHandler
 */
package org.dom4j.io;

import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import java.io.Writer;
import javax.xml.transform.sax.SAXResult;
import org.dom4j.io.OutputFormat;
import org.dom4j.io.XMLWriter;
import org.xml.sax.ContentHandler;
import org.xml.sax.ext.LexicalHandler;

public class XMLResult
extends SAXResult {
    private XMLWriter xmlWriter;

    public XMLResult() {
        this(new XMLWriter());
    }

    public XMLResult(OutputStream outputStream) throws UnsupportedEncodingException {
        super(new XMLWriter(outputStream));
    }

    public XMLResult(OutputStream outputStream, OutputFormat outputFormat) throws UnsupportedEncodingException {
        super(new XMLWriter(outputStream, outputFormat));
    }

    public XMLResult(Writer writer) {
        super(new XMLWriter(writer));
    }

    public XMLResult(Writer writer, OutputFormat outputFormat) {
        super(new XMLWriter(writer, outputFormat));
    }

    public XMLResult(XMLWriter xMLWriter) {
        super((ContentHandler)xMLWriter);
        this.xmlWriter = xMLWriter;
        this.setLexicalHandler((LexicalHandler)xMLWriter);
    }

    public ContentHandler getHandler() {
        return this.xmlWriter;
    }

    public LexicalHandler getLexicalHandler() {
        return this.xmlWriter;
    }

    public XMLWriter getXMLWriter() {
        return this.xmlWriter;
    }

    public void setXMLWriter(XMLWriter xMLWriter) {
        this.xmlWriter = xMLWriter;
        this.setHandler((ContentHandler)this.xmlWriter);
        this.setLexicalHandler((LexicalHandler)this.xmlWriter);
    }
}

