Package org.springframework.mock.web
Class DelegatingServletOutputStream
java.lang.Object
java.io.OutputStream
jakarta.servlet.ServletOutputStream
org.springframework.mock.web.DelegatingServletOutputStream
- All Implemented Interfaces:
- Closeable,- Flushable,- AutoCloseable
Delegating implementation of 
ServletOutputStream.
 Used by MockHttpServletResponse; typically not directly
 used for testing application controllers.
- Since:
- 1.0.2
- Author:
- Juergen Hoeller
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionDelegatingServletOutputStream(OutputStream targetStream) Create a DelegatingServletOutputStream for the given target stream.
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()voidflush()final OutputStreamReturn the underlying target stream (nevernull).booleanisReady()voidsetWriteListener(WriteListener writeListener) voidwrite(int b) Methods inherited from class jakarta.servlet.ServletOutputStreamprint, print, print, print, print, print, print, println, println, println, println, println, println, println, printlnMethods inherited from class java.io.OutputStreamnullOutputStream, write, write
- 
Constructor Details- 
DelegatingServletOutputStreamCreate a DelegatingServletOutputStream for the given target stream.- Parameters:
- targetStream- the target stream (never- null)
 
 
- 
- 
Method Details- 
getTargetStreamReturn the underlying target stream (nevernull).
- 
write- Specified by:
- writein class- OutputStream
- Throws:
- IOException
 
- 
flush- Specified by:
- flushin interface- Flushable
- Overrides:
- flushin class- OutputStream
- Throws:
- IOException
 
- 
close- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Overrides:
- closein class- OutputStream
- Throws:
- IOException
 
- 
isReadypublic boolean isReady()- Specified by:
- isReadyin class- ServletOutputStream
 
- 
setWriteListener- Specified by:
- setWriteListenerin class- ServletOutputStream
 
 
-