org.springframework.mock.web
Class DelegatingServletOutputStream

java.lang.Object
  extended by ServletOutputStream
      extended by org.springframework.mock.web.DelegatingServletOutputStream
Direct Known Subclasses:
MockHttpServletResponse.ResponseServletOutputStream

public class DelegatingServletOutputStream
extends ServletOutputStream

Delegating implementation of javax.servlet.ServletOutputStream.

Used by MockHttpServletResponse; typically not directly used for testing application controllers.

Since:
1.0.2
Author:
Juergen Hoeller
See Also:
MockHttpServletResponse

Field Summary
private  java.io.OutputStream targetStream
           
 
Constructor Summary
DelegatingServletOutputStream(java.io.OutputStream targetStream)
          Create a DelegatingServletOutputStream for the given target stream.
 
Method Summary
 void close()
           
 void flush()
           
 java.io.OutputStream getTargetStream()
          Return the underlying target stream (never null).
 void write(int b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

targetStream

private final java.io.OutputStream targetStream
Constructor Detail

DelegatingServletOutputStream

public DelegatingServletOutputStream(java.io.OutputStream targetStream)
Create a DelegatingServletOutputStream for the given target stream.

Parameters:
targetStream - the target stream (never null)
Method Detail

getTargetStream

public final java.io.OutputStream getTargetStream()
Return the underlying target stream (never null).


write

public void write(int b)
           throws java.io.IOException
Throws:
java.io.IOException

flush

public void flush()
           throws java.io.IOException
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException