Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.caucho.jsp
Class QBodyContent

    java.lang.Object
      |
      +--java.io.Writer
            |
            +--javax.servlet.jsp.JspWriter
                  |
                  +--javax.servlet.jsp.tagext.BodyContent
                        |
                        +--com.caucho.jsp.QBodyContent

All Implemented Interfaces:
  ByteWriteStream, EnclosedWriteStream

public class QBodyContent
extends BodyContent
implements ByteWriteStream, EnclosedWriteStream

Implementation of the JSP 1.1 BodyContent interface.

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()` Clear the contents of the buffer.
`void` | `clearBody()` Clears the body contents.
`void` | `clearBuffer()` Clears the current contents of the buffer.
`void` | `close()` Close the stream, flushing it first
`void` | `flush()` Redefined flush() so it is not legal.
`int` | `getBufferSize()` This method returns the size of the buffer used by the JspWriter.
`JspWriter` | `getEnclosingWriter()` Returns the enclosing writer.
`java.io.Reader` | `getReader()` Returns a reader to the body content.
`int` | `getRemaining()` This method returns the number of unused bytes in the buffer.
`java.lang.String` | `getString()` Returns a string representing the body content.
`WriteStream` | `getWriteStream()` Returns the underlying write stream for the content.
`boolean` | `isAutoFlush()` This method indicates whether the JspWriter is autoFlushing.
`void` | `newLine()` Writes a newline to the stream.
`void` | `print(boolean b)` Print a boolean value.
`void` | `print(char ch)` Print a character.
`void` | `print(char[] s)` 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 o)` 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 b)` Print a boolean value and then terminate the line.
`void` | `println(char ch)` Print a character and then terminate the line.
`void` | `println(char[] s)` 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 o)` Print an Object and then terminate the line.
`void` | `println(java.lang.String s)` Print a String and then terminate the line.
`void` | `release()` Releases the body content at the end of the tag.
`void` | `write(byte[] buf, int off, int len)` Writes bytes to the stream.
`void` | `write(char[] buf)` Writes characters to the stream.
`void` | `write(char[] buf, int off, int len)` Writes characters to the stream.
`void` | `write(int i)` Writes an integer to the stream.
`void` | `write(java.lang.String s)` Writes a string to the stream.
`void` | `write(java.lang.String s, int off, int len)` Writes a substring to the stream.
`void` | `writeOut(java.io.Writer out)` Writes the body contents out to the named writer.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getWriteStream

    public WriteStream getWriteStream()

  Returns the underlying write stream for the content.
  Specified by:
    `getWriteStream` in interface `EnclosedWriteStream`

### getEnclosingWriter

    public JspWriter getEnclosingWriter()

  Returns the enclosing writer.
  Overrides:
    `getEnclosingWriter` in class `BodyContent`
  Following copied from class: `javax.servlet.jsp.tagext.BodyContent`
  Returns:
    the enclosing JspWriter passed at construction time

### write

    public final void write(byte[] buf,
                            int off,
                            int len)
                     throws java.io.IOException

  Writes bytes to the stream.
  Specified by:
    `write` in interface `ByteWriteStream`
  Parameters:
    `buf` - byte buffer
    `off` - starting offset into the buffer
    `len` - length of valid bytes in the buffer.

### write

    public final void write(char[] buf,
                            int off,
                            int len)
                     throws java.io.IOException

  Writes characters to the stream.
  Overrides:
    `write` in class `java.io.Writer`
  Parameters:
    `buf` - character buffer
    `off` - starting offset into the buffer
    `len` - length of valid bytes in the buffer.

### write

    public final void write(int i)
                     throws java.io.IOException

  Writes an integer to the stream.
  Overrides:
    `write` in class `java.io.Writer`
  Parameters:
    `i` - the integer to write

### write

    public final void write(char[] buf)
                     throws java.io.IOException

  Writes characters to the stream.
  Overrides:
    `write` in class `java.io.Writer`
  Parameters:
    `buf` - character buffer

### write

    public final void write(java.lang.String s)
                     throws java.io.IOException

  Writes a string to the stream.
  Overrides:
    `write` in class `java.io.Writer`
  Parameters:
    `s` - the string to write

### write

    public final void write(java.lang.String s,
                            int off,
                            int len)
                     throws java.io.IOException

  Writes a substring to the stream.
  Overrides:
    `write` in class `java.io.Writer`
  Parameters:
    `s` - the string to write
    `off` - starting offset into the string
    `len` - length of the substring

### newLine

    public final void newLine()
                       throws java.io.IOException

  Writes a newline to the stream.
  Overrides:
    `newLine` in class `JspWriter`
  Following copied from class: `javax.servlet.jsp.JspWriter`
  Throws:
    `java.io.IOException` - If an I/O error occurs

### print

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

  Description copied from class: `JspWriter`
  Print a boolean value. The string produced by ``String.valueOf(boolean)`` is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the ``Writer.write(int)`` method.
  Overrides:
    `print` in class `JspWriter`
  Following copied from class: `javax.servlet.jsp.JspWriter`
  Parameters:
    `b` - The `boolean` to be printed
  Throws:
    `java.io.IOException` -

### print

    public final void print(char ch)
                     throws java.io.IOException

  Description copied from class: `JspWriter`
  Print a character. The character is translated into one or more bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the ``Writer.write(int)`` method.
  Overrides:
    `print` in class `JspWriter`
  Following copied from class: `javax.servlet.jsp.JspWriter`
  Parameters:
    `c` - The `char` to be printed
  Throws:
    `java.io.IOException` -

### print

    public final void print(int i)
                     throws java.io.IOException

  Description copied from class: `JspWriter`
  Print an integer. The string produced by ``String.valueOf(int)`` is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the ``Writer.write(int)`` method.
  Overrides:
    `print` in class `JspWriter`
  Following copied from class: `javax.servlet.jsp.JspWriter`
  Parameters:
    `i` - The `int` to be printed
  Throws:
    `java.io.IOException` -
  See Also:
    `java.lang.Integer#toString(int)`

### print

    public final void print(long l)
                     throws java.io.IOException

  Description copied from class: `JspWriter`
  Print a long integer. The string produced by ``String.valueOf(long)`` is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the ``Writer.write(int)`` method.
  Overrides:
    `print` in class `JspWriter`
  Following copied from class: `javax.servlet.jsp.JspWriter`
  Parameters:
    `l` - The `long` to be printed
  Throws:
    `java.io.IOException` -
  See Also:
    `java.lang.Long#toString(long)`

### print

    public final void print(float f)
                     throws java.io.IOException

  Description copied from class: `JspWriter`
  Print a floating-point number. The string produced by ``String.valueOf(float)`` is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the ``Writer.write(int)`` method.
  Overrides:
    `print` in class `JspWriter`
  Following copied from class: `javax.servlet.jsp.JspWriter`
  Parameters:
    `f` - The `float` to be printed
  Throws:
    `java.io.IOException` -
  See Also:
    `java.lang.Float#toString(float)`

### print

    public final void print(double d)
                     throws java.io.IOException

  Description copied from class: `JspWriter`
  Print a double-precision floating-point number. The string produced by ``String.valueOf(double)`` is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the ``Writer.write(int)`` method.
  Overrides:
    `print` in class `JspWriter`
  Following copied from class: `javax.servlet.jsp.JspWriter`
  Parameters:
    `d` - The `double` to be printed
  Throws:
    `java.io.IOException` -
  See Also:
    `java.lang.Double#toString(double)`

### print

    public final void print(char[] s)
                     throws java.io.IOException

  Description copied from class: `JspWriter`
  Print an array of characters. The characters are converted into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the ``Writer.write(int)`` method.
  Overrides:
    `print` in class `JspWriter`
  Following copied from class: `javax.servlet.jsp.JspWriter`
  Parameters:
    `s` - The array of chars to be printed
  Throws:
    `NullPointerException` - If `s` is `null`
    `java.io.IOException` -

### print

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

  Description copied from class: `JspWriter`
  Print a string. If the argument is `null` then the string `"null"` is printed. Otherwise, the string's characters are converted into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the ``Writer.write(int)`` method.
  Overrides:
    `print` in class `JspWriter`
  Following copied from class: `javax.servlet.jsp.JspWriter`
  Parameters:
    `s` - The `String` to be printed
  Throws:
    `java.io.IOException` -

### print

    public final void print(java.lang.Object o)
                     throws java.io.IOException

  Description copied from class: `JspWriter`
  Print an object. The string produced by the ``String.valueOf(Object)`` method is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the ``Writer.write(int)`` method.
  Overrides:
    `print` in class `JspWriter`
  Following copied from class: `javax.servlet.jsp.JspWriter`
  Parameters:
    `obj` - The `Object` to be printed
  Throws:
    `java.io.IOException` -
  See Also:
    `Object.toString()`

### println

    public final void println()
                       throws java.io.IOException

  Description copied from class: `JspWriter`
  Terminate the current line by writing the line separator string. The line separator string is defined by the system property `line.separator`, and is not necessarily a single newline character (`'\n'`).
  Overrides:
    `println` in class `JspWriter`
  Following copied from class: `javax.servlet.jsp.JspWriter`
  Throws:
    `java.io.IOException` -

### println

    public final void println(boolean b)
                       throws java.io.IOException

  Description copied from class: `JspWriter`
  Print a boolean value and then terminate the line. This method behaves as though it invokes ``JspWriter.print(boolean)`` and then ``JspWriter.println()``.
  Overrides:
    `println` in class `JspWriter`
  Following copied from class: `javax.servlet.jsp.JspWriter`
  Throws:
    `java.io.IOException` -

### println

    public final void println(char ch)
                       throws java.io.IOException

  Description copied from class: `JspWriter`
  Print a character and then terminate the line. This method behaves as though it invokes ``JspWriter.print(char)`` and then ``JspWriter.println()``.
  Overrides:
    `println` in class `JspWriter`
  Following copied from class: `javax.servlet.jsp.JspWriter`
  Throws:
    `java.io.IOException` -

### println

    public final void println(int i)
                       throws java.io.IOException

  Description copied from class: `JspWriter`
  Print an integer and then terminate the line. This method behaves as though it invokes ``JspWriter.print(int)`` and then ``JspWriter.println()``.
  Overrides:
    `println` in class `JspWriter`
  Following copied from class: `javax.servlet.jsp.JspWriter`
  Throws:
    `java.io.IOException` -

### println

    public final void println(long l)
                       throws java.io.IOException

  Description copied from class: `JspWriter`
  Print a long integer and then terminate the line. This method behaves as though it invokes ``JspWriter.print(long)`` and then ``JspWriter.println()``.
  Overrides:
    `println` in class `JspWriter`
  Following copied from class: `javax.servlet.jsp.JspWriter`
  Throws:
    `java.io.IOException` -

### println

    public final void println(float f)
                       throws java.io.IOException

  Description copied from class: `JspWriter`
  Print a floating-point number and then terminate the line. This method behaves as though it invokes ``JspWriter.print(float)`` and then ``JspWriter.println()``.
  Overrides:
    `println` in class `JspWriter`
  Following copied from class: `javax.servlet.jsp.JspWriter`
  Throws:
    `java.io.IOException` -

### println

    public final void println(double d)
                       throws java.io.IOException

  Description copied from class: `JspWriter`
  Print a double-precision floating-point number and then terminate the line. This method behaves as though it invokes ``JspWriter.print(double)`` and then ``JspWriter.println()``.
  Overrides:
    `println` in class `JspWriter`
  Following copied from class: `javax.servlet.jsp.JspWriter`
  Throws:
    `java.io.IOException` -

### println

    public final void println(char[] s)
                       throws java.io.IOException

  Description copied from class: `JspWriter`
  Print an array of characters and then terminate the line. This method behaves as though it invokes `print(char[])` and then `println()`.
  Overrides:
    `println` in class `JspWriter`
  Following copied from class: `javax.servlet.jsp.JspWriter`
  Throws:
    `java.io.IOException` -

### println

    public final void println(java.lang.String s)
                       throws java.io.IOException

  Description copied from class: `JspWriter`
  Print a String and then terminate the line. This method behaves as though it invokes ``JspWriter.print(String)`` and then ``JspWriter.println()``.
  Overrides:
    `println` in class `JspWriter`
  Following copied from class: `javax.servlet.jsp.JspWriter`
  Throws:
    `java.io.IOException` -

### println

    public final void println(java.lang.Object o)
                       throws java.io.IOException

  Description copied from class: `JspWriter`
  Print an Object and then terminate the line. This method behaves as though it invokes ``JspWriter.print(Object)`` and then ``JspWriter.println()``.
  Overrides:
    `println` in class `JspWriter`
  Following copied from class: `javax.servlet.jsp.JspWriter`
  Throws:
    `java.io.IOException` -

### clear

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

  Description copied from class: `JspWriter`
  Clear the contents of the buffer. If the buffer has been already been flushed then the clear operation shall throw an IOException to signal the fact that some data has already been irrevocably written to the client response stream.
  Overrides:
    `clear` in class `JspWriter`
  Following copied from class: `javax.servlet.jsp.JspWriter`
  Throws:
    `java.io.IOException` - If an I/O error occurs

### clearBuffer

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

  Description copied from class: `JspWriter`
  Clears the current contents of the buffer. Unlike clear(), this method will not throw an IOException if the buffer has already been flushed. It merely clears the current content of the buffer and returns.
  Overrides:
    `clearBuffer` in class `JspWriter`
  Following copied from class: `javax.servlet.jsp.JspWriter`
  Throws:
    `java.io.IOException` - If an I/O error occurs

### flush

    public final void flush()
                     throws java.io.IOException

  Description copied from class: `BodyContent`
  Redefined flush() so it is not legal.

  It is not valid to flush a BodyContent because there is no backing stream behind it.

  Overrides:
    `flush` in class `BodyContent`
  Following copied from class: `javax.servlet.jsp.JspWriter`
  Throws:
    `java.io.IOException` - If an I/O error occurs

### close

    public final void close()
                     throws java.io.IOException

  Description copied from class: `JspWriter`
  Close the stream, flushing it first

  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.

  Overrides:
    `close` in class `JspWriter`
  Following copied from class: `javax.servlet.jsp.JspWriter`
  Throws:
    `java.io.IOException` - If an I/O error occurs

### getBufferSize

    public final int getBufferSize()

  Description copied from class: `JspWriter`
  This method returns the size of the buffer used by the JspWriter.
  Overrides:
    `getBufferSize` in class `JspWriter`
  Following copied from class: `javax.servlet.jsp.JspWriter`
  Returns:
    the size of the buffer in bytes, or 0 is unbuffered.

### getRemaining

    public final int getRemaining()

  Description copied from class: `JspWriter`
  This method returns the number of unused bytes in the buffer.
  Overrides:
    `getRemaining` in class `JspWriter`
  Following copied from class: `javax.servlet.jsp.JspWriter`
  Returns:
    the number of bytes unused in the buffer

### isAutoFlush

    public final boolean isAutoFlush()

  Description copied from class: `JspWriter`
  This method indicates whether the JspWriter is autoFlushing.
  Overrides:
    `isAutoFlush` in class `JspWriter`
  Following copied from class: `javax.servlet.jsp.JspWriter`
  Returns:
    if this JspWriter is auto flushing or throwing IOExceptions on buffer overflow conditions

### clearBody

    public void clearBody()

  Clears the body contents.
  Overrides:
    `clearBody` in class `BodyContent`

### getReader

    public java.io.Reader getReader()

  Returns a reader to the body content.
  Overrides:
    `getReader` in class `BodyContent`
  Following copied from class: `javax.servlet.jsp.tagext.BodyContent`
  Returns:
    the value of this BodyContent as a Reader

### getString

    public java.lang.String getString()

  Returns a string representing the body content.
  Overrides:
    `getString` in class `BodyContent`
  Following copied from class: `javax.servlet.jsp.tagext.BodyContent`
  Returns:
    the value of the BodyContent as a String

### writeOut

    public void writeOut(java.io.Writer out)
                  throws java.io.IOException

  Writes the body contents out to the named writer.
  Overrides:
    `writeOut` in class `BodyContent`
  Following copied from class: `javax.servlet.jsp.tagext.BodyContent`
  Parameters:
    `out` - The writer into which to place the contents of this body evaluation

### release

    public void release()
                 throws java.io.IOException

  Releases the body content at the end of the tag.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD