out |
Variable name:
out
Class name:
javax.servlet.jsp.JspWriter
Extends:
java.io.Writer
Implements:
None
Implemented by:
A concrete subclass of this abstract class is provided as an internal container-dependent class.
JSP page type:
Available in both regular JSP pages and error pages
Description
The out variable is assigned to a concrete subclass of the JspWriter abstract class by the web container. JspWriter emulates some of the functionality found in the java.io.BufferedWriter and java.io.PrintWriter classes. It differs, however, in that it throws a java.io.IOException from the print methods (the PrintWriter does not).

If the page directive attribute autoflush is set to true, all the I/O operations on this class automatically flush the contents of the buffer when it's full. If autoflush is set to false, all the I/O operations on this class throw an IOException when the buffer is full.

JspWriter() |
protected JspWriter(int bufferSize, boolean autoFlush)
Creates an instance with at least the specified buffer size and autoflush behavior.

clear() |
public abstract void clear() throws java.io.IOException
Clears the contents of the buffer. If the buffer has already been flushed, throws an IOException to signal the fact that some data has already been irrevocably written to the client response stream.

clearBuffer() |
public abstract void clearBuffer() throws java.io.IOException
Clears the current contents of the buffer. Unlike clear(), this method does not throw an IOException if the buffer has already been flushed. It just clears the current content of the buffer and returns.

close() |
public abstract void close() throws java.io.IOException
Closes the JspWriter after flushing it. Calls to flush() or write() after a call to close() cause an IOException to be thrown. If close() is called on a previously closed JspWriter, it is ignored.

flush() |
public abstract void flush() throws java.io.IOException
Flushes the current contents of the buffer to the underlying writer, then flushes the underlying writer. This means the buffered content is delivered to the client immediately.

getBufferSize() |
public int getBufferSize()
Returns the size of the buffer in bytes, or 0 if it is not buffered.

getRemaining() |
public abstract int getRemaining()
Returns the number of unused bytes in the buffer.

isAutoFlush() |
public boolean isAutoFlush()
Returns true if this JspWriter is set to autoflush the buffer, false otherwise.