public class DelegatingServletInputStream extends ServletInputStream
ServletInputStream
.
Used by MockHttpServletRequest
; typically not directly
used for testing application controllers.
MockHttpServletRequest
Constructor and Description |
---|
DelegatingServletInputStream(java.io.InputStream sourceStream)
Create a DelegatingServletInputStream for the given source stream.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
java.io.InputStream |
getSourceStream()
Return the underlying source stream (never
null ). |
int |
read() |
readLine
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
read
in class java.io.InputStream
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.InputStream
java.io.IOException