org.springframework.mock.web
Class MockJspWriter
java.lang.Object
   java.io.Writer
java.io.Writer
       javax.servlet.jsp.JspWriter
javax.servlet.jsp.JspWriter
           org.springframework.mock.web.MockJspWriter
org.springframework.mock.web.MockJspWriter
- All Implemented Interfaces: 
- Closeable, Flushable, Appendable
- public class MockJspWriter 
- extends JspWriter
Mock implementation of the JspWriter class.
 
Used for testing the web framework; only necessary for testing
 applications when testing custom JSP tags.
- Since:
- 2.5
- Author:
- Juergen Hoeller
 
 
 
 
 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
MockJspWriter
public MockJspWriter(HttpServletResponse response)
- Create a MockJspWriter for the given response,
 using the response's default Writer.
 
- Parameters:
- response- the servlet response to wrap
 
MockJspWriter
public MockJspWriter(Writer targetWriter)
- Create a MockJspWriter for the given plain Writer.
 
- Parameters:
- targetWriter- the target Writer to wrap
 
MockJspWriter
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
 
getTargetWriter
protected PrintWriter getTargetWriter()
                               throws IOException
- Lazily initialize the target Writer.
 
- 
- Throws:
- IOException
 
clear
public void clear()
           throws IOException
- 
- Specified by:
- clearin class- JspWriter
 
- 
- Throws:
- IOException
 
clearBuffer
public void clearBuffer()
                 throws IOException
- 
- Specified by:
- clearBufferin class- JspWriter
 
- 
- Throws:
- IOException
 
flush
public void flush()
           throws IOException
- 
- Specified by:
- flushin interface- Flushable
- Specified by:
- flushin class- JspWriter
 
- 
- Throws:
- IOException
 
close
public void close()
           throws IOException
- 
- Specified by:
- closein interface- Closeable
- Specified by:
- closein class- JspWriter
 
- 
- Throws:
- IOException
 
getRemaining
public int getRemaining()
- 
- Specified by:
- getRemainingin class- JspWriter
 
- 
 
newLine
public void newLine()
             throws IOException
- 
- Specified by:
- newLinein class- JspWriter
 
- 
- Throws:
- IOException
 
write
public void write(char[] value,
                  int offset,
                  int length)
           throws IOException
- 
- Specified by:
- writein class- Writer
 
- 
- Throws:
- IOException
 
print
public void print(boolean value)
           throws IOException
- 
- Specified by:
- printin class- JspWriter
 
- 
- Throws:
- IOException
 
print
public void print(char value)
           throws IOException
- 
- Specified by:
- printin class- JspWriter
 
- 
- Throws:
- IOException
 
print
public void print(char[] value)
           throws IOException
- 
- Specified by:
- printin class- JspWriter
 
- 
- Throws:
- IOException
 
print
public void print(double value)
           throws IOException
- 
- Specified by:
- printin class- JspWriter
 
- 
- Throws:
- IOException
 
print
public void print(float value)
           throws IOException
- 
- Specified by:
- printin class- JspWriter
 
- 
- Throws:
- IOException
 
print
public void print(int value)
           throws IOException
- 
- Specified by:
- printin class- JspWriter
 
- 
- Throws:
- IOException
 
print
public void print(long value)
           throws IOException
- 
- Specified by:
- printin class- JspWriter
 
- 
- Throws:
- IOException
 
print
public void print(Object value)
           throws IOException
- 
- Specified by:
- printin class- JspWriter
 
- 
- Throws:
- IOException
 
print
public void print(String value)
           throws IOException
- 
- Specified by:
- printin class- JspWriter
 
- 
- Throws:
- IOException
 
println
public void println()
             throws IOException
- 
- Specified by:
- printlnin class- JspWriter
 
- 
- Throws:
- IOException
 
println
public void println(boolean value)
             throws IOException
- 
- Specified by:
- printlnin class- JspWriter
 
- 
- Throws:
- IOException
 
println
public void println(char value)
             throws IOException
- 
- Specified by:
- printlnin class- JspWriter
 
- 
- Throws:
- IOException
 
println
public void println(char[] value)
             throws IOException
- 
- Specified by:
- printlnin class- JspWriter
 
- 
- Throws:
- IOException
 
println
public void println(double value)
             throws IOException
- 
- Specified by:
- printlnin class- JspWriter
 
- 
- Throws:
- IOException
 
println
public void println(float value)
             throws IOException
- 
- Specified by:
- printlnin class- JspWriter
 
- 
- Throws:
- IOException
 
println
public void println(int value)
             throws IOException
- 
- Specified by:
- printlnin class- JspWriter
 
- 
- Throws:
- IOException
 
println
public void println(long value)
             throws IOException
- 
- Specified by:
- printlnin class- JspWriter
 
- 
- Throws:
- IOException
 
println
public void println(Object value)
             throws IOException
- 
- Specified by:
- printlnin class- JspWriter
 
- 
- Throws:
- IOException
 
println
public void println(String value)
             throws IOException
- 
- Specified by:
- printlnin class- JspWriter
 
- 
- Throws:
- IOException
 
Copyright © 2002-2008 The Spring Framework.