Package org.springframework.mock.web
Class DelegatingServletInputStream
java.lang.Object
java.io.InputStream
jakarta.servlet.ServletInputStream
org.springframework.mock.web.DelegatingServletInputStream
- All Implemented Interfaces:
- Closeable,- AutoCloseable
Delegating implementation of 
ServletInputStream.
 Used by MockHttpServletRequest; typically not directly
 used for testing application controllers.
- Since:
- 1.0.2
- Author:
- Juergen Hoeller
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionDelegatingServletInputStream(InputStream sourceStream) Create a DelegatingServletInputStream for the given source stream.
- 
Method SummaryModifier and TypeMethodDescriptionintvoidclose()final InputStreamReturn the underlying source stream (nevernull).booleanbooleanisReady()intread()voidsetReadListener(ReadListener readListener) Methods inherited from class jakarta.servlet.ServletInputStreamreadLineMethods inherited from class java.io.InputStreammark, markSupported, nullInputStream, read, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
- 
Constructor Details- 
DelegatingServletInputStreamCreate a DelegatingServletInputStream for the given source stream.- Parameters:
- sourceStream- the source stream (never- null)
 
 
- 
- 
Method Details- 
getSourceStreamReturn the underlying source stream (nevernull).
- 
read- Specified by:
- readin class- InputStream
- Throws:
- IOException
 
- 
available- Overrides:
- availablein class- InputStream
- Throws:
- IOException
 
- 
close- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Overrides:
- closein class- InputStream
- Throws:
- IOException
 
- 
isFinishedpublic boolean isFinished()- Specified by:
- isFinishedin class- ServletInputStream
 
- 
isReadypublic boolean isReady()- Specified by:
- isReadyin class- ServletInputStream
 
- 
setReadListener- Specified by:
- setReadListenerin class- ServletInputStream
 
 
-