|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjava.io.Writer
javax.servlet.jsp.JspWriter
javax.servlet.jsp.tagext.BodyContent
public abstract class BodyContent
An encapsulation of the evaluation of the body of an action so it is available to a tag handler. BodyContent is a subclass of JspWriter.
Note that the content of BodyContent is the result of evaluation, so it will not contain actions and the like, but the result of their invocation.
BodyContent has methods to convert its contents into a String, to read its contents, and to clear the contents.
The buffer size of a BodyContent object is unbounded. A BodyContent object cannot be in autoFlush mode. It is not possible to invoke flush on a BodyContent object, as there is no backing stream.
Instances of BodyContent are created by invoking the pushBody and popBody methods of the PageContext class. A BodyContent is enclosed within another JspWriter (maybe another BodyContent object) following the structure of their associated actions.
A BodyContent is made available to a BodyTag through a setBodyContent() call. The tag handler can use the object until after the call to doEndTag().
| 字段摘要 |
|---|
| 从类 javax.servlet.jsp.JspWriter 继承的字段 |
|---|
autoFlush, bufferSize, DEFAULT_BUFFER, NO_BUFFER, UNBOUNDED_BUFFER |
| 从类 java.io.Writer 继承的字段 |
|---|
lock |
| 构造方法摘要 | |
|---|---|
protected |
BodyContent(JspWriter e)
Protected constructor. |
| 方法摘要 | |
|---|---|
void |
clearBody()
Clear the body without throwing any exceptions. |
void |
flush()
Redefined flush() so it is not legal. |
JspWriter |
getEnclosingWriter()
Get the enclosing JspWriter. |
abstract Reader |
getReader()
Return the value of this BodyContent as a Reader. |
abstract String |
getString()
Return the value of the BodyContent as a String. |
abstract void |
writeOut(Writer out)
Write the contents of this BodyContent into a Writer. |
| 从类 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 |
| 从类 java.io.Writer 继承的方法 |
|---|
append, append, append, write, write, write, write, write |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 构造方法详细信息 |
|---|
protected BodyContent(JspWriter e)
e - the enclosing JspWriter| 方法详细信息 |
|---|
public void flush()
throws IOException
It is not valid to flush a BodyContent because there is no backing stream behind it.
Flushable 中的 flushJspWriter 中的 flushIOException - always thrownpublic void clearBody()
public abstract Reader getReader()
public abstract String getString()
public abstract void writeOut(Writer out)
throws IOException
out - The writer into which to place the contents of
this body evaluation
IOException - if an I/O error occurred while writing the
contents of this BodyContent to the given Writerpublic JspWriter getEnclosingWriter()
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||