Class BodyContentImpl

All Implemented Interfaces:
Closeable, Flushable, Appendable, AutoCloseable

public class BodyContentImpl extends BodyContent
Write text to a character-output stream, buffering characters so as to provide for the efficient writing of single characters, arrays, and strings. Provide support for discarding for the output that has been buffered.
Author:
Rajiv Mordani, Jan Luehe
  • Field Summary

    Fields inherited from class jakarta.servlet.jsp.JspWriter

    autoFlush, bufferSize, DEFAULT_BUFFER, NO_BUFFER, UNBOUNDED_BUFFER

    Fields inherited from class java.io.Writer

    lock
  • Constructor Summary

    Constructors
    Constructor
    Description
    BodyContentImpl(JspWriter enclosingWriter, boolean limitBuffer, int tagBufferSize)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Clear the contents of the buffer.
    void
    Clears the current contents of the buffer.
    void
    Close the stream, flushing it first.
    int
    This method returns the size of the buffer used by the JspWriter.
    Return the value of this BodyContent as a Reader.
    int
    This method returns the number of unused bytes in the buffer.
    Return the value of the BodyContent as a String.
    void
    Write a line separator.
    void
    print(boolean b)
    Print a boolean value.
    void
    print(char c)
    Print a character.
    void
    print(char[] s)
    Print an array of characters.
    void
    print(double d)
    Print a double-precision floating-point number.
    void
    print(float f)
    Print a floating-point number.
    void
    print(int i)
    Print an integer.
    void
    print(long l)
    Print a long integer.
    void
    Print an object.
    void
    Print a string.
    void
    Terminate the current line by writing the line separator string.
    void
    println(boolean x)
    Print a boolean value and then terminate the line.
    void
    println(char x)
    Print a character and then terminate the line.
    void
    println(char[] x)
    Print an array of characters and then terminate the line.
    void
    println(double x)
    Print a double-precision floating-point number and then terminate the line.
    void
    println(float x)
    Print a floating-point number and then terminate the line.
    void
    println(int x)
    Print an integer and then terminate the line.
    void
    println(long x)
    Print a long integer and then terminate the line.
    void
    Print an Object and then terminate the line.
    void
    Print a String and then terminate the line.
    protected void
    This method shall "reset" the internal state of a BodyContentImpl, releasing all internal references, and preparing it for potential reuse by a later invocation of PageContextImpl.pushBody(Writer).
    void
    write(char[] buf)
     
    void
    write(char[] cbuf, int off, int len)
     
    void
    write(int c)
     
    void
     
    void
    write(String s, int off, int len)
     
    void
    Write the contents of this BodyContent into a Writer.

    Methods inherited from class jakarta.servlet.jsp.tagext.BodyContent

    clearBody, flush, getEnclosingWriter

    Methods inherited from class jakarta.servlet.jsp.JspWriter

    isAutoFlush

    Methods inherited from class java.io.Writer

    append, append, append, nullWriter

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait