org.springframework.mock.web
Class DelegatingServletInputStream

java.lang.Object
  extended by ServletInputStream
      extended by org.springframework.mock.web.DelegatingServletInputStream

public class DelegatingServletInputStream
extends ServletInputStream

Delegating implementation of javax.servlet.ServletInputStream.

Used by MockHttpServletRequest; typically not directly used for testing application controllers.

Since:
1.0.2
Author:
Juergen Hoeller
See Also:
MockHttpServletRequest

Field Summary
private  java.io.InputStream sourceStream
           
 
Constructor Summary
DelegatingServletInputStream(java.io.InputStream sourceStream)
          Create a DelegatingServletInputStream for the given source stream.
 
Method Summary
 void close()
           
 java.io.InputStream getSourceStream()
          Return the underlying source stream (never null).
 int read()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sourceStream

private final java.io.InputStream sourceStream
Constructor Detail

DelegatingServletInputStream

public DelegatingServletInputStream(java.io.InputStream sourceStream)
Create a DelegatingServletInputStream for the given source stream.

Parameters:
sourceStream - the source stream (never null)
Method Detail

getSourceStream

public final java.io.InputStream getSourceStream()
Return the underlying source stream (never null).


read

public int read()
         throws java.io.IOException
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException