org.riotfamily.forms.fileupload
Class CountingServletInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by javax.servlet.ServletInputStream
          extended by org.riotfamily.forms.fileupload.CountingServletInputStream
All Implemented Interfaces:
Closeable

public class CountingServletInputStream
extends ServletInputStream

ServletInputStream that counts the number of bytes read. This class is used to provide progress information for file uploads.


Constructor Summary
CountingServletInputStream()
           
 
Method Summary
 long getBytesRead()
           
 int read()
           
 void setSourceStream(ServletInputStream sourceStream)
           
 
Methods inherited from class javax.servlet.ServletInputStream
readLine
 
Methods inherited from class java.io.InputStream
available, close, 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

CountingServletInputStream

public CountingServletInputStream()
Method Detail

setSourceStream

public void setSourceStream(ServletInputStream sourceStream)

read

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

getBytesRead

public long getBytesRead()