|
|||||||||
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
org.apache.jasper.runtime.BodyContentImpl
public class BodyContentImpl
Write text to a character-output stream, buffering characters so as to provide for the efficient writing of single characters, arrays, and strings. Provide support for discarding for the output that has been buffered.
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 | |
---|---|
BodyContentImpl(javax.servlet.jsp.JspWriter enclosingWriter)
Constructor. |
Method Summary | |
---|---|
void |
clear()
Clear the contents of the buffer. |
void |
clearBuffer()
Clears the current contents of the buffer. |
void |
close()
Close the stream, flushing it first. |
int |
getBufferSize()
This method returns the size of the buffer used by the JspWriter. |
java.io.Reader |
getReader()
Return the value of this BodyContent as a Reader. |
int |
getRemaining()
This method returns the number of unused bytes in the buffer. |
java.lang.String |
getString()
Return the value of the BodyContent as a String. |
void |
newLine()
Write a line separator. |
void |
print(boolean flag)
Print a boolean value. |
void |
print(char c)
Print a character. |
void |
print(char[] ac)
Print an array of characters. |
void |
print(double d)
Print a double-precision floating-point number. |
void |
print(float f)
Print a floating-point number. |
void |
print(int i)
Print an integer. |
void |
print(long l)
Print a long integer. |
void |
print(java.lang.Object obj)
Print an object. |
void |
print(java.lang.String s)
Print a string. |
void |
println()
Terminate the current line by writing the line separator string. |
void |
println(boolean flag)
Print a boolean value and then terminate the line. |
void |
println(char c)
Print a character and then terminate the line. |
void |
println(char[] ac)
Print an array of characters and then terminate the line. |
void |
println(double d)
Print a double-precision floating-point number and then terminate the line. |
void |
println(float f)
Print a floating-point number and then terminate the line. |
void |
println(int i)
Print an integer and then terminate the line. |
void |
println(long l)
Print a long integer and then terminate the line. |
void |
println(java.lang.Object obj)
Print an Object and then terminate the line. |
void |
println(java.lang.String s)
Print a String and then terminate the line. |
void |
write(char[] ac)
|
void |
write(char[] ac,
int i,
int j)
|
void |
write(int i)
|
void |
write(java.lang.String s)
|
void |
write(java.lang.String s,
int i,
int j)
|
void |
writeOut(java.io.Writer writer)
Write the contents of this BodyContent into a Writer. |
Methods inherited from class javax.servlet.jsp.tagext.BodyContent |
---|
clearBody, flush, getEnclosingWriter |
Methods inherited from class javax.servlet.jsp.JspWriter |
---|
isAutoFlush |
Methods inherited from class java.io.Writer |
---|
append, append, append |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BodyContentImpl(javax.servlet.jsp.JspWriter enclosingWriter)
Method Detail |
---|
public void write(int i) throws java.io.IOException
write
in class java.io.Writer
java.io.IOException
public void write(char[] ac, int i, int j) throws java.io.IOException
write
in class java.io.Writer
java.io.IOException
public void write(char[] ac) throws java.io.IOException
write
in class java.io.Writer
java.io.IOException
public void write(java.lang.String s, int i, int j) throws java.io.IOException
write
in class java.io.Writer
java.io.IOException
public void write(java.lang.String s) throws java.io.IOException
write
in class java.io.Writer
java.io.IOException
public void newLine() throws java.io.IOException
javax.servlet.jsp.JspWriter
newLine
in class javax.servlet.jsp.JspWriter
java.io.IOException
- If an I/O error occurspublic void print(boolean flag) throws java.io.IOException
javax.servlet.jsp.JspWriter
String.valueOf(boolean)
is written to the
JspWriter's buffer or, if no buffer is used, directly to the
underlying writer.
print
in class javax.servlet.jsp.JspWriter
flag
- The boolean
to be printed
java.io.IOException
- If an error occured while writingpublic void print(char c) throws java.io.IOException
javax.servlet.jsp.JspWriter
print
in class javax.servlet.jsp.JspWriter
c
- The char
to be printed
java.io.IOException
- If an error occured while writingpublic void print(int i) throws java.io.IOException
javax.servlet.jsp.JspWriter
String.valueOf(int)
is written to the
JspWriter's buffer or, if no buffer is used, directly to the
underlying writer.
print
in class javax.servlet.jsp.JspWriter
i
- The int
to be printed
java.io.IOException
- If an error occured while writingInteger.toString(int)
public void print(long l) throws java.io.IOException
javax.servlet.jsp.JspWriter
String.valueOf(long)
is written to the
JspWriter's buffer or, if no buffer is used, directly to the
underlying writer.
print
in class javax.servlet.jsp.JspWriter
l
- The long
to be printed
java.io.IOException
- If an error occured while writingLong.toString(long)
public void print(float f) throws java.io.IOException
javax.servlet.jsp.JspWriter
String.valueOf(float)
is written to the
JspWriter's buffer or, if no buffer is used, directly to the
underlying writer.
print
in class javax.servlet.jsp.JspWriter
f
- The float
to be printed
java.io.IOException
- If an error occured while writingFloat.toString(float)
public void print(double d) throws java.io.IOException
javax.servlet.jsp.JspWriter
String.valueOf(double)
is written to
the JspWriter's buffer or, if no buffer is used, directly to the
underlying writer.
print
in class javax.servlet.jsp.JspWriter
d
- The double
to be printed
java.io.IOException
- If an error occured while writingDouble.toString(double)
public void print(char[] ac) throws java.io.IOException
javax.servlet.jsp.JspWriter
print
in class javax.servlet.jsp.JspWriter
ac
- The array of chars to be printed
java.io.IOException
- If an error occured while writingpublic void print(java.lang.String s) throws java.io.IOException
javax.servlet.jsp.JspWriter
null
then the string
"null"
is printed. Otherwise, the string's characters are
written to the JspWriter's buffer or, if no buffer is used, directly
to the underlying writer.
print
in class javax.servlet.jsp.JspWriter
s
- The String
to be printed
java.io.IOException
- If an error occured while writingpublic void print(java.lang.Object obj) throws java.io.IOException
javax.servlet.jsp.JspWriter
String.valueOf(Object)
method is written to the
JspWriter's buffer or, if no buffer is used, directly to the
underlying writer.
print
in class javax.servlet.jsp.JspWriter
obj
- The Object
to be printed
java.io.IOException
- If an error occured while writingObject.toString()
public void println() throws java.io.IOException
javax.servlet.jsp.JspWriter
line.separator
, and is not necessarily a single newline
character ('\n'
).
println
in class javax.servlet.jsp.JspWriter
java.io.IOException
- If an error occured while writingpublic void println(boolean flag) throws java.io.IOException
javax.servlet.jsp.JspWriter
JspWriter.print(boolean)
and then
JspWriter.println()
.
println
in class javax.servlet.jsp.JspWriter
flag
- the boolean to write
java.io.IOException
- If an error occured while writingpublic void println(char c) throws java.io.IOException
javax.servlet.jsp.JspWriter
JspWriter.print(char)
and then JspWriter.println()
.
println
in class javax.servlet.jsp.JspWriter
c
- the char to write
java.io.IOException
- If an error occured while writingpublic void println(int i) throws java.io.IOException
javax.servlet.jsp.JspWriter
JspWriter.print(int)
and then JspWriter.println()
.
println
in class javax.servlet.jsp.JspWriter
i
- the int to write
java.io.IOException
- If an error occured while writingpublic void println(long l) throws java.io.IOException
javax.servlet.jsp.JspWriter
JspWriter.print(long)
and then
JspWriter.println()
.
println
in class javax.servlet.jsp.JspWriter
l
- the long to write
java.io.IOException
- If an error occured while writingpublic void println(float f) throws java.io.IOException
javax.servlet.jsp.JspWriter
JspWriter.print(float)
and then
JspWriter.println()
.
println
in class javax.servlet.jsp.JspWriter
f
- the float to write
java.io.IOException
- If an error occured while writingpublic void println(double d) throws java.io.IOException
javax.servlet.jsp.JspWriter
JspWriter.print(double)
and then JspWriter.println()
.
println
in class javax.servlet.jsp.JspWriter
d
- the double to write
java.io.IOException
- If an error occured while writingpublic void println(char[] ac) throws java.io.IOException
javax.servlet.jsp.JspWriter
print(char[])
and then
println()
.
println
in class javax.servlet.jsp.JspWriter
ac
- the char[] to write
java.io.IOException
- If an error occured while writingpublic void println(java.lang.String s) throws java.io.IOException
javax.servlet.jsp.JspWriter
JspWriter.print(String)
and then
JspWriter.println()
.
println
in class javax.servlet.jsp.JspWriter
s
- the String to write
java.io.IOException
- If an error occured while writingpublic void println(java.lang.Object obj) throws java.io.IOException
javax.servlet.jsp.JspWriter
JspWriter.print(Object)
and then
JspWriter.println()
.
println
in class javax.servlet.jsp.JspWriter
obj
- the Object to write
java.io.IOException
- If an error occured while writingpublic void clear() throws java.io.IOException
javax.servlet.jsp.JspWriter
clear
in class javax.servlet.jsp.JspWriter
java.io.IOException
- If an I/O error occurspublic void clearBuffer() throws java.io.IOException
javax.servlet.jsp.JspWriter
clearBuffer
in class javax.servlet.jsp.JspWriter
java.io.IOException
- If an I/O error occurspublic void close() throws java.io.IOException
javax.servlet.jsp.JspWriter
This method needs not be invoked explicitly for the initial JspWriter as the code generated by the JSP container will automatically include a call to close().
Closing a previously-closed stream, unlike flush(), has no effect.
close
in interface java.io.Closeable
close
in class javax.servlet.jsp.JspWriter
java.io.IOException
- If an I/O error occurspublic int getRemaining()
javax.servlet.jsp.JspWriter
getRemaining
in class javax.servlet.jsp.JspWriter
public java.io.Reader getReader()
javax.servlet.jsp.tagext.BodyContent
getReader
in class javax.servlet.jsp.tagext.BodyContent
public java.lang.String getString()
javax.servlet.jsp.tagext.BodyContent
getString
in class javax.servlet.jsp.tagext.BodyContent
public void writeOut(java.io.Writer writer) throws java.io.IOException
javax.servlet.jsp.tagext.BodyContent
writeOut
in class javax.servlet.jsp.tagext.BodyContent
writer
- The writer into which to place the contents of
this body evaluation
java.io.IOException
- if an I/O error occurred while writing the
contents of this BodyContent to the given Writerpublic int getBufferSize()
javax.servlet.jsp.JspWriter
getBufferSize
in class javax.servlet.jsp.JspWriter
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |