org.scohen.juploadr.upload
Class BandwidthThrottlingOutputStream

java.lang.Object
  extended byjava.io.OutputStream
      extended byorg.scohen.juploadr.upload.BandwidthThrottlingOutputStream

public class BandwidthThrottlingOutputStream
extends java.io.OutputStream


Constructor Summary
BandwidthThrottlingOutputStream(java.io.OutputStream out, int maxBytesPerSecond)
           
 
Method Summary
 void setMaxBytesPerSecond(int bytesPerSecond)
           
 void write(byte[] b)
           
 void write(byte[] b, int off, int len)
           
 void write(int b)
           
 
Methods inherited from class java.io.OutputStream
close, flush
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BandwidthThrottlingOutputStream

public BandwidthThrottlingOutputStream(java.io.OutputStream out,
                                       int maxBytesPerSecond)
Method Detail

write

public void write(int b)
           throws java.io.IOException
Throws:
java.io.IOException

write

public void write(byte[] b,
                  int off,
                  int len)
           throws java.io.IOException
Throws:
java.io.IOException

write

public void write(byte[] b)
           throws java.io.IOException
Throws:
java.io.IOException

setMaxBytesPerSecond

public void setMaxBytesPerSecond(int bytesPerSecond)