org.springframework.mock.web
Class DelegatingServletInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by javax.servlet.ServletInputStream
          extended by org.springframework.mock.web.DelegatingServletInputStream
All Implemented Interfaces:
Closeable

public class DelegatingServletInputStream
extends ServletInputStream

Delegating implementation of ServletInputStream.

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

Since:
1.0.2
Author:
Juergen Hoeller
See Also:
MockHttpServletRequest

Constructor Summary
DelegatingServletInputStream(InputStream sourceStream)
          Create a new DelegatingServletInputStream.
 
Method Summary
 void close()
           
 InputStream getSourceStream()
           
 int read()
           
 
Methods inherited from class javax.servlet.ServletInputStream
readLine
 
Methods inherited from class java.io.InputStream
available, mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegatingServletInputStream

public DelegatingServletInputStream(InputStream sourceStream)
Create a new DelegatingServletInputStream.

Parameters:
sourceStream - the sourceStream InputStream
Method Detail

getSourceStream

public InputStream getSourceStream()

read

public int read()
         throws IOException
Specified by:
read in class InputStream
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class InputStream
Throws:
IOException


Copyright (c) 2002-2007 The Spring Framework Project.