com.caucho.jsp
Class BodyContentImpl

java.lang.Object
  extended by java.io.Writer
      extended by javax.servlet.jsp.JspWriter
          extended by javax.servlet.jsp.tagext.BodyContent
              extended by com.caucho.jsp.BodyContentImpl
All Implemented Interfaces:
FlushBuffer, java.io.Closeable, java.io.Flushable, java.lang.Appendable

public class BodyContentImpl
extends BodyContent

Implementation of the JSP BodyContent interface.


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
 
Method Summary
 void clear()
           
 void clearBody()
          Clears the body contents.
 void clearBuffer()
           
 void close()
           
 void flush()
          Flush does nothing for a bodyContent.
 void flushBuffer()
          Writes the body contents out to the named writer.
 int getBufferSize()
           
 CharBuffer getCharBuffer()
           
 JspWriter getEnclosingWriter()
          Returns the parent JSP writer.
 java.io.Reader getReader()
          Returns a reader to the body content.
 int getRemaining()
           
 java.lang.String getString()
          Returns a string representing the body content.
 java.lang.String getTrimString()
          Returns a string representing the body content.
 java.io.PrintWriter getWriter()
          Returns the print writer.
 boolean isAutoFlush()
          Returns the autoFlush flag.
 void newLine()
          Writes the newline character.
 void print(boolean b)
          Prints a boolean.
 void print(char ch)
          Prints a character.
 void print(char[] s)
          Prints a character array
 void print(double d)
           
 void print(float f)
           
 void print(int i)
           
 void print(long v)
           
 void print(java.lang.Object v)
          Prints the value of the object.
 void print(java.lang.String s)
          Prints a string.
 void println()
          Prints the newline.
 void println(boolean v)
          Prints the boolean followed by a newline.
 void println(char v)
          Prints a character followed by a newline.
 void println(char[] s)
          Writes a character array followed by a newline.
 void println(double v)
          Prints a double followed by a newline.
 void println(float v)
          Prints a float followed by a newline.
 void println(int v)
          Prints an integer followed by a newline.
 void println(long v)
          Prints a long followed by a newline.
 void println(java.lang.Object v)
          Writes an object followed by a newline.
 void println(java.lang.String s)
          Writes a string followed by a newline.
 void release()
          Releases the body content at the end of the tag.
 void setParent(JspWriter parent)
          Sets the parent.
 void setPrintNullAsBlank(boolean enable)
           
 void write(char[] buf)
          Writes a char buffer to the output.
 void write(char[] buf, int off, int len)
          Writes characters to the stream.
 void write(int ch)
          Writes characters to the stream.
 void write(java.lang.String s)
          Writes a string to the output.
 void write(java.lang.String s, int off, int len)
          Writes characters to the stream.
 void writeOut(java.io.Writer out)
          Writes the body contents out to the named writer.
 
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
 

Method Detail

write

public final void write(char[] buf,
                        int off,
                        int len)
                 throws java.io.IOException
Writes characters to the stream.

Parameters:
buf - character buffer
off - starting offset into the buffer
len - length of valid bytes in the buffer.
Throws:
java.io.IOException

write

public final void write(java.lang.String s,
                        int off,
                        int len)
                 throws java.io.IOException
Writes characters to the stream.

Parameters:
s - string
off - starting offset into the buffer
len - length of valid bytes in the buffer.
Throws:
java.io.IOException

write

public final void write(int ch)
                 throws java.io.IOException
Writes characters to the stream.

Parameters:
ch - character to write.
Throws:
java.io.IOException

clear

public final void clear()
                 throws java.io.IOException
Throws:
java.io.IOException

clearBuffer

public final void clearBuffer()
                       throws java.io.IOException
Throws:
java.io.IOException

flush

public final void flush()
                 throws java.io.IOException
Description copied from class: BodyContent
Flush does nothing for a bodyContent.

Specified by:
flush in interface java.io.Flushable
Throws:
java.io.IOException

close

public final void close()
                 throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Throws:
java.io.IOException

getBufferSize

public final int getBufferSize()

getRemaining

public final int getRemaining()

clearBody

public void clearBody()
Clears the body contents.


getReader

public java.io.Reader getReader()
Returns a reader to the body content.


getCharBuffer

public CharBuffer getCharBuffer()

getString

public java.lang.String getString()
Returns a string representing the body content.


getTrimString

public java.lang.String getTrimString()
Returns a string representing the body content.


writeOut

public void writeOut(java.io.Writer out)
              throws java.io.IOException
Writes the body contents out to the named writer.

Parameters:
out - the destination writer .
Throws:
java.io.IOException

flushBuffer

public void flushBuffer()
                 throws java.io.IOException
Writes the body contents out to the named writer.

Specified by:
flushBuffer in interface FlushBuffer
Throws:
java.io.IOException

getWriter

public java.io.PrintWriter getWriter()
Returns the print writer.


release

public void release()
Releases the body content at the end of the tag.


setPrintNullAsBlank

public void setPrintNullAsBlank(boolean enable)

write

public final void write(char[] buf)
                 throws java.io.IOException
Writes a char buffer to the output.

Overrides:
write in class java.io.Writer
Parameters:
buf - the buffer to write.
Throws:
java.io.IOException

write

public final void write(java.lang.String s)
                 throws java.io.IOException
Writes a string to the output.

Overrides:
write in class java.io.Writer
Throws:
java.io.IOException

newLine

public void newLine()
             throws java.io.IOException
Writes the newline character.

Specified by:
newLine in class JspWriter
Throws:
java.io.IOException

print

public final void print(boolean b)
                 throws java.io.IOException
Prints a boolean.

Specified by:
print in class JspWriter
Throws:
java.io.IOException

print

public void print(char ch)
           throws java.io.IOException
Prints a character.

Specified by:
print in class JspWriter
Throws:
java.io.IOException

print

public void print(int i)
           throws java.io.IOException
Specified by:
print in class JspWriter
Throws:
java.io.IOException

print

public void print(long v)
           throws java.io.IOException
Specified by:
print in class JspWriter
Throws:
java.io.IOException

print

public final void print(float f)
                 throws java.io.IOException
Specified by:
print in class JspWriter
Throws:
java.io.IOException

print

public final void print(double d)
                 throws java.io.IOException
Specified by:
print in class JspWriter
Throws:
java.io.IOException

print

public final void print(char[] s)
                 throws java.io.IOException
Prints a character array

Specified by:
print in class JspWriter
Throws:
java.io.IOException

print

public final void print(java.lang.String s)
                 throws java.io.IOException
Prints a string.

Specified by:
print in class JspWriter
Throws:
java.io.IOException

print

public final void print(java.lang.Object v)
                 throws java.io.IOException
Prints the value of the object.

Specified by:
print in class JspWriter
Throws:
java.io.IOException

println

public void println()
             throws java.io.IOException
Prints the newline.

Specified by:
println in class JspWriter
Throws:
java.io.IOException

println

public final void println(boolean v)
                   throws java.io.IOException
Prints the boolean followed by a newline.

Specified by:
println in class JspWriter
Parameters:
v - the value to print
Throws:
java.io.IOException

println

public final void println(char v)
                   throws java.io.IOException
Prints a character followed by a newline.

Specified by:
println in class JspWriter
Parameters:
v - the value to print
Throws:
java.io.IOException

println

public final void println(int v)
                   throws java.io.IOException
Prints an integer followed by a newline.

Specified by:
println in class JspWriter
Parameters:
v - the value to print
Throws:
java.io.IOException

println

public final void println(long v)
                   throws java.io.IOException
Prints a long followed by a newline.

Specified by:
println in class JspWriter
Parameters:
v - the value to print
Throws:
java.io.IOException

println

public final void println(float v)
                   throws java.io.IOException
Prints a float followed by a newline.

Specified by:
println in class JspWriter
Parameters:
v - the value to print
Throws:
java.io.IOException

println

public final void println(double v)
                   throws java.io.IOException
Prints a double followed by a newline.

Specified by:
println in class JspWriter
Parameters:
v - the value to print
Throws:
java.io.IOException

println

public final void println(char[] s)
                   throws java.io.IOException
Writes a character array followed by a newline.

Specified by:
println in class JspWriter
Throws:
java.io.IOException

println

public final void println(java.lang.String s)
                   throws java.io.IOException
Writes a string followed by a newline.

Specified by:
println in class JspWriter
Throws:
java.io.IOException

println

public final void println(java.lang.Object v)
                   throws java.io.IOException
Writes an object followed by a newline.

Specified by:
println in class JspWriter
Throws:
java.io.IOException

setParent

public void setParent(JspWriter parent)
Sets the parent.


getEnclosingWriter

public final JspWriter getEnclosingWriter()
Returns the parent JSP writer.

Overrides:
getEnclosingWriter in class BodyContent

isAutoFlush

public final boolean isAutoFlush()
Returns the autoFlush flag.

Overrides:
isAutoFlush in class JspWriter