ro.isdc.wro.http.support
Class DelegatingServletInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by javax.servlet.ServletInputStream
          extended by ro.isdc.wro.http.support.DelegatingServletInputStream
All Implemented Interfaces:
Closeable

public class DelegatingServletInputStream
extends javax.servlet.ServletInputStream

Delegating implementation of ServletInputStream. The implementation of this class is inspired from dwr.

Author:
Alex Objelean

Constructor Summary
DelegatingServletInputStream(InputStream proxy)
          Create a new DelegatingServletInputStream.
 
Method Summary
 void close()
           
 InputStream getSourceStream()
           
 InputStream getTargetStream()
          Accessor for the stream that we are proxying to
 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 proxy)
Create a new DelegatingServletInputStream.

Parameters:
proxy - the sourceStream InputStream
Method Detail

getTargetStream

public InputStream getTargetStream()
Accessor for the stream that we are proxying to

Returns:
The stream we proxy to

getSourceStream

public InputStream getSourceStream()
Returns:
The stream that we proxy to

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 © 2008-2013. All Rights Reserved.