All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.poi.xwpf.converter.xhtml.DefaultContentHandlerFactory Maven / Gradle / Ivy

package org.apache.poi.xwpf.converter.xhtml;

import java.io.OutputStream;
import java.io.Writer;

import org.xml.sax.ContentHandler;

/**
 * Default {@link IContentHandlerFactory} which create instance SAX {@link SimpleContentHandler}.
 */
public class DefaultContentHandlerFactory
    implements IContentHandlerFactory
{

    public static final IContentHandlerFactory INSTANCE = new DefaultContentHandlerFactory();

    public ContentHandler create( OutputStream out, Writer writer, XHTMLOptions options )
    {

        return out != null ? new SimpleContentHandler( out, options.getIndent() )
                        : new SimpleContentHandler( writer, options.getIndent() );
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy