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

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

Introduction

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

Prototype


abstract public int getRemaining();

Source Link

Document

This method returns the number of unused bytes in the buffer.

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.ja  v a  2 s.co 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);
}