Example usage for javax.servlet.jsp.tagext BodyContent getBufferSize

List of usage examples for javax.servlet.jsp.tagext BodyContent getBufferSize

Introduction

In this page you can find the example usage for javax.servlet.jsp.tagext BodyContent getBufferSize.

Prototype


public int getBufferSize() 

Source Link

Document

This method returns the size of the buffer used by the JspWriter.

Usage

From source file:org.theospi.portfolio.help.control.GlossaryTag.java

public int doAfterBody() throws JspException {
    BodyContent body = getBodyContent();
    JspWriter out = body.getEnclosingWriter();
    Reader reader = body.getReader();
    Set termSet = getTerms();//from w  w w. j  a  v  a2 s . c o m
    GlossaryEntry[] terms = new GlossaryEntry[termSet.size()];
    terms = (GlossaryEntry[]) termSet.toArray(terms);

    try {

        HelpTagHelper.renderHelp(reader, body.getBufferSize() - body.getRemaining(), out, terms, firstOnly,
                hover, link);
    } catch (IOException ioe) {
        logger.error(ioe.getMessage(), ioe);
    } finally {
        body.clearBody(); // Clear for next evaluation
    }
    return (SKIP_BODY);
}