public class DelegatingServletInputStream
extends ServletInputStream
javax.servlet.ServletInputStream
.
Used by MockHttpServletRequest
; typically not directly
used for testing application controllers.
MockHttpServletRequest
Modifier and Type | Field and Description |
---|---|
private boolean |
finished |
private java.io.InputStream |
sourceStream |
Constructor and Description |
---|
DelegatingServletInputStream(java.io.InputStream sourceStream)
Create a DelegatingServletInputStream for the given source stream.
|
Modifier and Type | Method and Description |
---|---|
int |
available() |
void |
close() |
java.io.InputStream |
getSourceStream()
Return the underlying source stream (never
null ). |
boolean |
isFinished() |
boolean |
isReady() |
int |
read() |
void |
setReadListener(ReadListener readListener) |
private final java.io.InputStream sourceStream
private boolean finished
public DelegatingServletInputStream(java.io.InputStream sourceStream)
sourceStream
- the source stream (never null
)public final java.io.InputStream getSourceStream()
null
).public int read() throws java.io.IOException
java.io.IOException
public int available() throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
java.io.IOException
public boolean isFinished()
public boolean isReady()
public void setReadListener(ReadListener readListener)