public class DelegatingServletInputStream extends ServletInputStream
ServletInputStream.
Used by MockHttpServletRequest; typically not directly
used for testing application controllers.
MockHttpServletRequest| Constructor and Description |
|---|
DelegatingServletInputStream(InputStream sourceStream)
Create a DelegatingServletInputStream for the given source stream.
|
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
close() |
InputStream |
getSourceStream()
Return the underlying source stream (never
null). |
boolean |
isFinished() |
boolean |
isReady() |
int |
read() |
void |
setReadListener(ReadListener readListener) |
readLinemark, markSupported, read, read, reset, skippublic DelegatingServletInputStream(InputStream sourceStream)
sourceStream - the source stream (never null)public final InputStream getSourceStream()
null).public int read()
throws IOException
read in class InputStreamIOExceptionpublic int available()
throws IOException
available in class InputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class InputStreamIOExceptionpublic boolean isFinished()
isFinished in class ServletInputStreampublic boolean isReady()
isReady in class ServletInputStreampublic void setReadListener(ReadListener readListener)
setReadListener in class ServletInputStream