org.metasyntactic.io
Class MonitorableInputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--org.metasyntactic.io.MonitorableInputStream
All Implemented Interfaces:
MonitorableStream

public class MonitorableInputStream
extends java.io.InputStream
implements MonitorableStream


Constructor Summary
MonitorableInputStream(java.io.InputStream in)
           
MonitorableInputStream(java.io.InputStream in, long startTime)
           
 
Method Summary
 int available()
           
 double bytesPerSecond()
           
 long bytesRead()
           
 void close()
           
 boolean equals(java.lang.Object obj)
           
 int hashCode()
           
 void mark(int readlimit)
           
 boolean markSupported()
           
 int read()
           
 int read(byte[] b)
           
 int read(byte[] b, int off, int len)
           
 void reset()
           
 long skip(long n)
           
 long timeRunning()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MonitorableInputStream

public MonitorableInputStream(java.io.InputStream in)

MonitorableInputStream

public MonitorableInputStream(java.io.InputStream in,
                              long startTime)
Method Detail

timeRunning

public long timeRunning()

bytesRead

public long bytesRead()

bytesPerSecond

public double bytesPerSecond()
Specified by:
bytesPerSecond in interface MonitorableStream

read

public int read()
         throws java.io.IOException
Specified by:
read in class java.io.InputStream
java.io.IOException

read

public int read(byte[] b,
                int off,
                int len)
         throws java.io.IOException
Overrides:
read in class java.io.InputStream
java.io.IOException

read

public int read(byte[] b)
         throws java.io.IOException
Overrides:
read in class java.io.InputStream
java.io.IOException

mark

public void mark(int readlimit)
Overrides:
mark in class java.io.InputStream

skip

public long skip(long n)
          throws java.io.IOException
Overrides:
skip in class java.io.InputStream
java.io.IOException

available

public int available()
              throws java.io.IOException
Overrides:
available in class java.io.InputStream
java.io.IOException

close

public void close()
           throws java.io.IOException
Overrides:
close in class java.io.InputStream
java.io.IOException

reset

public void reset()
           throws java.io.IOException
Overrides:
reset in class java.io.InputStream
java.io.IOException

markSupported

public boolean markSupported()
Overrides:
markSupported in class java.io.InputStream

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object