public abstract class BodyContent extends JspWriter
void doAfterBody() throws JspException
{
BodyContent body = getBodyContent();
JspWriter out = body.getEnclosingWriter();
try {
body.writeOut(out);
} catch (IOException e) {
throw new JspException(String.valueOf(e));
}
}
autoFlush, bufferSize, DEFAULT_BUFFER, NO_BUFFER, UNBOUNDED_BUFFER
Modifier | Constructor and Description |
---|---|
protected |
BodyContent(JspWriter prevOut)
Creates a new BodyContent with prevOut as its enclosing writer.
|
Modifier and Type | Method and Description |
---|---|
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.
|
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
protected BodyContent(JspWriter prevOut)
prevOut
- the enclosing writer.public JspWriter getEnclosingWriter()
public void flush() throws 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