Package javax.servlet.jsp.tagext
Class BodyContent
- java.lang.Object
-
- java.io.Writer
-
- javax.servlet.jsp.JspWriter
-
- javax.servlet.jsp.tagext.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.
-
-
Field Summary
-
Fields inherited from class javax.servlet.jsp.JspWriter
autoFlush, bufferSize, DEFAULT_BUFFER, NO_BUFFER, UNBOUNDED_BUFFER
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBodyContent(JspWriter e)Protected constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidclearBody()Clear the body.voidflush()Redefine flush().JspWritergetEnclosingWriter()Get the enclosing JspWriterabstract java.io.ReadergetReader()Return the value of this BodyContent as a Reader.abstract java.lang.StringgetString()Return the value of the BodyContent as a String.abstract voidwriteOut(java.io.Writer out)Write the contents of this BodyContent into a Writer.-
Methods inherited from class javax.servlet.jsp.JspWriter
clear, clearBuffer, close, getBufferSize, getRemaining, isAutoFlush, newLine, print, print, print, print, print, print, print, print, print, println, println, println, println, println, println, println, println, println, println
-
-
-
-
Constructor Detail
-
BodyContent
protected BodyContent(JspWriter e)
Protected constructor. Unbounded buffer, no autoflushing.
-
-
Method Detail
-
flush
public void flush() throws java.io.IOExceptionRedefine flush(). It is not valid to flush.
-
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.IOExceptionWrite 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
-
-