class OutputTemplateHandler extends AbstractTemplateHandler {


    private final Writer writer;



    /**
     * <p>
     *   Creates a new instance of this handler.
     * </p>
     *
     * @param writer the writer to which output will be written.
     */
    public OutputTemplateHandler(final Writer writer) {
        super();
        if (writer == null) {
            throw new IllegalArgumentException("Writer cannot be null");
        }
        this.writer = writer;
    }




    @Override
    public void handleText(final IText text) {
        
        try {
            text.write(this.writer);
        } catch (final Exception e) {
            throw new TemplateOutputException(
                    "An error happened during template rendering",
                    text.getTemplateName(), text.getLine(), text.getCol(), e);
        }

        // Just in case someone set us a 'next'
        super.handleText(text);

    }



    @Override
    public void handleComment(final IComment comment) {
        
        try {
            comment.write(this.writer);
        } catch (final Exception e) {
            throw new TemplateOutputException(
                    "An error happened during template rendering",
                    comment.getTemplateName(), comment.getLine(), comment.getCol(), e);
        }

        // Just in case someone set us a 'next'
        super.handleComment(comment);

    }

    
    @Override
    public void handleCDATASection(final ICDATASection cdataSection) {<FILL_FUNCTION_BODY>}




    @Override
    public void handleStandaloneElement(final IStandaloneElementTag standaloneElementTag) {

        try {
            standaloneElementTag.write(this.writer);
        } catch (final Exception e) {
            throw new TemplateOutputException(
                    "An error happened during template rendering",
                    standaloneElementTag.getTemplateName(), standaloneElementTag.getLine(), standaloneElementTag.getCol(), e);
        }

        // Just in case someone set us a 'next'
        super.handleStandaloneElement(standaloneElementTag);

    }


    @Override
    public void handleOpenElement(final IOpenElementTag openElementTag) {

        try {
            openElementTag.write(this.writer);
        } catch (final Exception e) {
            throw new TemplateOutputException(
                    "An error happened during template rendering",
                    openElementTag.getTemplateName(), openElementTag.getLine(), openElementTag.getCol(), e);
        }

        // Just in case someone set us a 'next'
        super.handleOpenElement(openElementTag);

    }


    @Override
    public void handleCloseElement(final ICloseElementTag closeElementTag) {

        try {
            closeElementTag.write(this.writer);
        } catch (final Exception e) {
            throw new TemplateOutputException(
                    "An error happened during template rendering",
                    closeElementTag.getTemplateName(), closeElementTag.getLine(), closeElementTag.getCol(), e);
        }

        // Just in case someone set us a 'next'
        super.handleCloseElement(closeElementTag);

    }




    @Override
    public void handleDocType(final IDocType docType) {
        
        try {
            docType.write(this.writer);
        } catch (final Exception e) {
            throw new TemplateOutputException(
                    "An error happened during template rendering",
                    docType.getTemplateName(), docType.getLine(), docType.getCol(), e);
        }

        // Just in case someone set us a 'next'
        super.handleDocType(docType);

    }

    
    
    
    @Override
    public void handleXMLDeclaration(final IXMLDeclaration xmlDeclaration) {

        try {
            xmlDeclaration.write(this.writer);
        } catch (final Exception e) {
            throw new TemplateOutputException(
                    "An error happened during template rendering",
                    xmlDeclaration.getTemplateName(), xmlDeclaration.getLine(), xmlDeclaration.getCol(), e);
        }

        // Just in case someone set us a 'next'
        super.handleXMLDeclaration(xmlDeclaration);

    }






    @Override
    public void handleProcessingInstruction(final IProcessingInstruction processingInstruction) {
        
        try {
            processingInstruction.write(this.writer);
        } catch (final Exception e) {
            throw new TemplateOutputException(
                    "An error happened during template rendering",
                    processingInstruction.getTemplateName(), processingInstruction.getLine(), processingInstruction.getCol(), e);
        }

        // Just in case someone set us a 'next'
        super.handleProcessingInstruction(processingInstruction);

    }


    
    
}

        
        try {
            cdataSection.write(this.writer);
        } catch (final Exception e) {
            throw new TemplateOutputException(
                    "An error happened during template rendering",
                    cdataSection.getTemplateName(), cdataSection.getLine(), cdataSection.getCol(), e);
        }

        // Just in case someone set us a 'next'
        super.handleCDATASection(cdataSection);

    
<methods>public void handleCDATASection(org.thymeleaf.model.ICDATASection) ,public void handleCloseElement(org.thymeleaf.model.ICloseElementTag) ,public void handleComment(org.thymeleaf.model.IComment) ,public void handleDocType(org.thymeleaf.model.IDocType) ,public void handleOpenElement(org.thymeleaf.model.IOpenElementTag) ,public void handleProcessingInstruction(org.thymeleaf.model.IProcessingInstruction) ,public void handleStandaloneElement(org.thymeleaf.model.IStandaloneElementTag) ,public void handleTemplateEnd(org.thymeleaf.model.ITemplateEnd) ,public void handleTemplateStart(org.thymeleaf.model.ITemplateStart) ,public void handleText(org.thymeleaf.model.IText) ,public void handleXMLDeclaration(org.thymeleaf.model.IXMLDeclaration) ,public void setContext(org.thymeleaf.context.ITemplateContext) ,public void setNext(org.thymeleaf.engine.ITemplateHandler) <variables>private org.thymeleaf.context.ITemplateContext context,private org.thymeleaf.engine.ITemplateHandler next