|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.Writer
javax.servlet.jsp.JspWriter
javax.servlet.jsp.tagext.BodyContent
public abstract class BodyContent
BodyContent subclasses JspWriter to accumulate the contents of a
BodyTag. The JSP engine is responsible for creating BodyContent objects;
tags just use them. A BodyTag will generally grab the contents in
its doAfterBody:
void doAfterBody() throws JspException
{
BodyContent body = getBodyContent();
JspWriter out = body.getEnclosingWriter();
try {
body.writeOut(out);
} catch (IOException e) {
throw new JspException(String.valueOf(e));
}
}
Field Summary |
---|
Fields inherited from class javax.servlet.jsp.JspWriter |
---|
autoFlush, bufferSize, DEFAULT_BUFFER, NO_BUFFER, UNBOUNDED_BUFFER |
Fields inherited from class java.io.Writer |
---|
lock |
Constructor Summary | |
---|---|
protected |
BodyContent(JspWriter prevOut)
Creates a new BodyContent with prevOut as its enclosing writer. |
Method Summary | |
---|---|
void |
clearBody()
Clears the contents of a body tag. |
void |
flush()
Flush does nothing for a bodyContent. |
JspWriter |
getEnclosingWriter()
Returns the encloding writer. |
abstract java.io.Reader |
getReader()
Returns a Reader for accessing the contents of a body tag. |
abstract java.lang.String |
getString()
Returns a String representing the contents of a body tag. |
abstract void |
writeOut(java.io.Writer out)
Writes the contents to the writer. |
Methods inherited from class javax.servlet.jsp.JspWriter |
---|
clear, clearBuffer, getBufferSize, getRemaining, isAutoFlush, newLine, print, print, print, print, print, print, print, print, print, println, println, println, println, println, println, println, println, println, println |
Methods inherited from class java.io.Writer |
---|
append, append, append, close, write, write, write, write, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected BodyContent(JspWriter prevOut)
prevOut
- the enclosing writer.Method Detail |
---|
public JspWriter getEnclosingWriter()
public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class JspWriter
java.io.IOException
public void clearBody()
public abstract java.io.Reader getReader()
public abstract java.lang.String getString()
public abstract void writeOut(java.io.Writer out) throws java.io.IOException
out
- the destination writer .
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |