public class

MockJspWriter

extends JspWriter
java.lang.Object
   ↳ JspWriter
     ↳ org.springframework.mock.web.MockJspWriter

Class Overview

Mock implementation of the javax.servlet.jsp.JspWriter class.

Used for testing the web framework; only necessary for testing applications when testing custom JSP tags.

Summary

Public Constructors
MockJspWriter(HttpServletResponse response)
Create a MockJspWriter for the given response, using the response's default Writer.
MockJspWriter(Writer targetWriter)
Create a MockJspWriter for the given plain Writer.
MockJspWriter(HttpServletResponse response, Writer targetWriter)
Create a MockJspWriter for the given response.
Public Methods
void clear()
void clearBuffer()
void close()
void flush()
int getRemaining()
void newLine()
void print(float value)
void print(double value)
void print(String value)
void print(Object value)
void print(char value)
void print(char[] value)
void print(long value)
void print(int value)
void print(boolean value)
void println()
void println(float value)
void println(int value)
void println(long value)
void println(Object value)
void println(char[] value)
void println(String value)
void println(char value)
void println(double value)
void println(boolean value)
void write(char[] value, int offset, int length)
Protected Methods
PrintWriter getTargetWriter()
Lazily initialize the target Writer.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public MockJspWriter (HttpServletResponse response)

Create a MockJspWriter for the given response, using the response's default Writer.

Parameters
response the servlet response to wrap

public MockJspWriter (Writer targetWriter)

Create a MockJspWriter for the given plain Writer.

Parameters
targetWriter the target Writer to wrap

public MockJspWriter (HttpServletResponse response, Writer targetWriter)

Create a MockJspWriter for the given response.

Parameters
response the servlet response to wrap
targetWriter the target Writer to wrap

Public Methods

public void clear ()

Throws
IOException

public void clearBuffer ()

Throws
IOException

public void close ()

Throws
IOException

public void flush ()

Throws
IOException

public int getRemaining ()

public void newLine ()

Throws
IOException

public void print (float value)

Throws
IOException

public void print (double value)

Throws
IOException

public void print (String value)

Throws
IOException

public void print (Object value)

Throws
IOException

public void print (char value)

Throws
IOException

public void print (char[] value)

Throws
IOException

public void print (long value)

Throws
IOException

public void print (int value)

Throws
IOException

public void print (boolean value)

Throws
IOException

public void println ()

Throws
IOException

public void println (float value)

Throws
IOException

public void println (int value)

Throws
IOException

public void println (long value)

Throws
IOException

public void println (Object value)

Throws
IOException

public void println (char[] value)

Throws
IOException

public void println (String value)

Throws
IOException

public void println (char value)

Throws
IOException

public void println (double value)

Throws
IOException

public void println (boolean value)

Throws
IOException

public void write (char[] value, int offset, int length)

Throws
IOException

Protected Methods

protected PrintWriter getTargetWriter ()

Lazily initialize the target Writer.

Throws
IOException