org.resteasy.mock
Class DelegatingServletOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by javax.servlet.ServletOutputStream
          extended by org.resteasy.mock.DelegatingServletOutputStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class DelegatingServletOutputStream
extends javax.servlet.ServletOutputStream

Delegating implementation of ServletOutputStream.

Used by org.springframework.mock.web.MockHttpServletResponse; typically not directly used for testing application controllers.

Since:
1.0.2
Author:
Juergen Hoeller
See Also:
org.springframework.mock.web.MockHttpServletResponse

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 javax.servlet.ServletOutputStream
print, print, print, print, print, print, print, println, println, println, println, println, println, println, println
 
Methods inherited from class java.io.OutputStream
write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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
Specified by:
write in class java.io.OutputStream
Throws:
java.io.IOException

flush

public void flush()
           throws java.io.IOException
Specified by:
flush in interface java.io.Flushable
Overrides:
flush in class java.io.OutputStream
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.OutputStream
Throws:
java.io.IOException


Copyright © 2008. All Rights Reserved.