Name

out

Synopsis

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, while 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.

Class Summary

public abstract class JspWriter extends java.io.Writer {
  // Constructor
  protected JspWriter(int bufferSize, boolean autoFlush);

  // Methods
  public abstract void clear( ) throws java.io.IOException;
  public abstract void clearBuffer( ) throws java.io.IOException;
  public abstract void close( )throws java.io.IOException;
  public abstract void flush( ) throws java.io.IOException;
  public int getBufferSize( );
  public abstract int getRemaining( );
  public boolean isAutoFlush( );
}

Constructor

protected JspWriter(int bufferSize, boolean autoFlush)

Creates an instance with ...

Get Java Server Pages now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.