org.metasyntactic.io
Class MonitorableOutputStream

java.lang.Object
  |
  +--java.io.OutputStream
        |
        +--org.metasyntactic.io.MonitorableOutputStream
All Implemented Interfaces:
MonitorableStream

public class MonitorableOutputStream
extends java.io.OutputStream
implements MonitorableStream


Constructor Summary
MonitorableOutputStream(java.io.OutputStream out)
           
MonitorableOutputStream(java.io.OutputStream out, long startTime)
           
 
Method Summary
 double bytesPerSecond()
           
 long bytesWritten()
           
 void close()
           
 boolean equals(java.lang.Object obj)
           
 void flush()
           
 int hashCode()
           
 long timeRunning()
           
 java.lang.String toString()
           
 void write(byte[] b)
           
 void write(byte[] b, int off, int len)
           
 void write(int b)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MonitorableOutputStream

public MonitorableOutputStream(java.io.OutputStream out)

MonitorableOutputStream

public MonitorableOutputStream(java.io.OutputStream out,
                               long startTime)
Method Detail

timeRunning

public long timeRunning()

bytesWritten

public long bytesWritten()

bytesPerSecond

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

write

public void write(int b)
           throws java.io.IOException
Specified by:
write in class java.io.OutputStream
java.io.IOException

close

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

write

public void write(byte[] b)
           throws java.io.IOException
Overrides:
write in class java.io.OutputStream
java.io.IOException

write

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

flush

public void flush()
           throws java.io.IOException
Overrides:
flush in class java.io.OutputStream
java.io.IOException

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