Class BodyContent

  • All Implemented Interfaces:
    java.io.Closeable, java.io.Flushable, java.lang.Appendable, java.lang.AutoCloseable

    public abstract class BodyContent
    extends JspWriter
    A JspWriter subclass that can be used to process body evaluations so they can re-extracted later on.
    • Constructor Detail

      • BodyContent

        protected BodyContent​(JspWriter e)
        Protected constructor. Unbounded buffer, no autoflushing.
    • Method Detail

      • flush

        public void flush()
                   throws java.io.IOException
        Redefine flush(). It is not valid to flush.
        Specified by:
        flush in interface java.io.Flushable
        Specified by:
        flush in class JspWriter
        Throws:
        java.io.IOException - If an I/O error occurs
      • clearBody

        public void clearBody()
        Clear the body.
      • getReader

        public abstract java.io.Reader getReader()
        Return the value of this BodyContent as a Reader. Note: this is after evaluation!! There are no scriptlets, etc in this stream.
      • getString

        public abstract java.lang.String getString()
        Return the value of the BodyContent as a String. Note: this is after evaluation!! There are no scriptlets, etc in this stream.
      • writeOut

        public abstract void writeOut​(java.io.Writer out)
                               throws java.io.IOException
        Write the contents of this BodyContent into a Writer. Subclasses are likely to do interesting things with the implementation so some things are extra efficient.
        Parameters:
        out - The writer into which to place the contents of this body evaluation
        Throws:
        java.io.IOException
      • getEnclosingWriter

        public JspWriter getEnclosingWriter()
        Get the enclosing JspWriter