|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.Writer javax.servlet.jsp.JspWriter javax.servlet.jsp.tagext.BodyContent org.springframework.extensions.surf.util.FakeBodyContent
public class FakeBodyContent
Implementation of the JSP BodyContent class. BodyContent extends JspWriter to allow access to the underlying buffer. The buffer can be cleared, converted to a string, or read through a Reader. It also has the notion of an enclosed writer, which is in essence a parent BodyContent. Finally, it has a writeOut method which allows for efficiently writing its contents to its parent (or another writer).
Field Summary | |
---|---|
boolean |
unbounded
The unbounded. |
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 | |
---|---|
FakeBodyContent(javax.servlet.jsp.JspWriter encl)
Instantiates a new fake body content. |
Method Summary | |
---|---|
void |
clear()
Clear the contents of the buffer, unless it was flushed. |
void |
clearBuffer()
Clear the contents of the buffer. |
void |
close()
Close is a no-op in BodyContent. |
void |
flush()
Flush is a no-op in BodyContent, since you have to explicitly write its contents to the enclosing writer. |
javax.servlet.jsp.JspWriter |
getEnclosingWriter()
Get the enclosing JspWriter. |
Reader |
getReader()
Return the value of this BodyContent as a Reader. |
int |
getRemaining()
Return remaining size in the buffer. |
String |
getString()
Return the value of the BodyContent as a String. |
void |
newLine()
Add a newline to the buffer. |
void |
print(boolean b)
|
void |
print(char c)
|
void |
print(char[] c)
|
void |
print(double d)
|
void |
print(float f)
|
void |
print(int i)
|
void |
print(long l)
|
void |
print(Object o)
|
void |
print(String s)
|
void |
println()
|
void |
println(boolean b)
|
void |
println(char c)
|
void |
println(char[] c)
|
void |
println(double d)
|
void |
println(float f)
|
void |
println(int i)
|
void |
println(long l)
|
void |
println(Object o)
|
void |
println(String s)
|
protected void |
setEnclosingWriter(javax.servlet.jsp.JspWriter encl)
Sets the enclosing writer. |
void |
write(char[] c,
int off,
int len)
Write an array of characters to the buffer. |
void |
write(int i)
Write the character represented by the integer i to the buffer. |
void |
write(String s)
Write the String s to the buffer. |
void |
writeOut(Writer out)
Write the contents of this BodyContent into a Writer. |
Methods inherited from class javax.servlet.jsp.tagext.BodyContent |
---|
clearBody |
Methods inherited from class javax.servlet.jsp.JspWriter |
---|
getBufferSize, isAutoFlush |
Methods inherited from class java.io.Writer |
---|
append, append, append, write, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public boolean unbounded
Constructor Detail |
---|
public FakeBodyContent(javax.servlet.jsp.JspWriter encl)
encl
- the enclMethod Detail |
---|
public void write(String s) throws IOException
write
in class Writer
s
- the s
IOException
- Signals that an I/O exception has occurred.public void write(int i) throws IOException
write
in class Writer
i
- the i
IOException
- Signals that an I/O exception has occurred.public void write(char[] c, int off, int len) throws IOException
write
in class Writer
c
- the coff
- the offlen
- the len
IOException
- Signals that an I/O exception has occurred.public void print(char c) throws IOException
print
in class javax.servlet.jsp.JspWriter
IOException
public void print(double d) throws IOException
print
in class javax.servlet.jsp.JspWriter
IOException
public void print(boolean b) throws IOException
print
in class javax.servlet.jsp.JspWriter
IOException
public void print(long l) throws IOException
print
in class javax.servlet.jsp.JspWriter
IOException
public void print(float f) throws IOException
print
in class javax.servlet.jsp.JspWriter
IOException
public void print(int i) throws IOException
print
in class javax.servlet.jsp.JspWriter
IOException
public void print(Object o) throws IOException
print
in class javax.servlet.jsp.JspWriter
IOException
public void print(char[] c) throws IOException
print
in class javax.servlet.jsp.JspWriter
IOException
public void print(String s) throws IOException
print
in class javax.servlet.jsp.JspWriter
IOException
public void println() throws IOException
println
in class javax.servlet.jsp.JspWriter
IOException
public void println(String s) throws IOException
println
in class javax.servlet.jsp.JspWriter
IOException
public void println(char c) throws IOException
println
in class javax.servlet.jsp.JspWriter
IOException
public void println(char[] c) throws IOException
println
in class javax.servlet.jsp.JspWriter
IOException
public void println(long l) throws IOException
println
in class javax.servlet.jsp.JspWriter
IOException
public void println(int i) throws IOException
println
in class javax.servlet.jsp.JspWriter
IOException
public void println(double d) throws IOException
println
in class javax.servlet.jsp.JspWriter
IOException
public void println(float f) throws IOException
println
in class javax.servlet.jsp.JspWriter
IOException
public void println(boolean b) throws IOException
println
in class javax.servlet.jsp.JspWriter
IOException
public void println(Object o) throws IOException
println
in class javax.servlet.jsp.JspWriter
IOException
public void close() throws IOException
close
in interface Closeable
close
in class javax.servlet.jsp.JspWriter
IOException
- Signals that an I/O exception has occurred.public void flush() throws IOException
flush
in interface Flushable
flush
in class javax.servlet.jsp.tagext.BodyContent
IOException
- Signals that an I/O exception has occurred.public int getRemaining()
getRemaining
in class javax.servlet.jsp.JspWriter
public void clear() throws IOException
clear
in class javax.servlet.jsp.JspWriter
IOException
- Signals that an I/O exception has occurred.public void clearBuffer() throws IOException
clearBuffer
in class javax.servlet.jsp.JspWriter
IOException
- Signals that an I/O exception has occurred.public void newLine() throws IOException
newLine
in class javax.servlet.jsp.JspWriter
IOException
- Signals that an I/O exception has occurred.public Reader getReader()
getReader
in class javax.servlet.jsp.tagext.BodyContent
public String getString()
getString
in class javax.servlet.jsp.tagext.BodyContent
public void writeOut(Writer out) throws IOException
writeOut
in class javax.servlet.jsp.tagext.BodyContent
out
- The writer into which to place the contents of this body
evaluation
IOException
- Signals that an I/O exception has occurred.public javax.servlet.jsp.JspWriter getEnclosingWriter()
getEnclosingWriter
in class javax.servlet.jsp.tagext.BodyContent
protected void setEnclosingWriter(javax.servlet.jsp.JspWriter encl)
encl
- the new enclosing writer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |