com.northconcepts.datapipeline.throttle
Class ThrottledOutputStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by com.northconcepts.datapipeline.meter.MeteredOutputStream
              extended by com.northconcepts.datapipeline.throttle.ThrottledOutputStream
All Implemented Interfaces:
Metered, Throttled, Closeable, Flushable

public class ThrottledOutputStream
extends MeteredOutputStream
implements Throttled


Field Summary
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
ThrottledOutputStream(OutputStream out, int unitsPerSecond)
           
 
Method Summary
 Throttle getThrottle()
           
 void write(byte[] b, int off, int len)
           
 void write(int b)
           
 
Methods inherited from class com.northconcepts.datapipeline.meter.MeteredOutputStream
close, getMeter
 
Methods inherited from class java.io.FilterOutputStream
flush, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThrottledOutputStream

public ThrottledOutputStream(OutputStream out,
                             int unitsPerSecond)
Method Detail

getThrottle

public Throttle getThrottle()
Specified by:
getThrottle in interface Throttled

write

public void write(byte[] b,
                  int off,
                  int len)
           throws IOException
Overrides:
write in class MeteredOutputStream
Throws:
IOException

write

public void write(int b)
           throws IOException
Overrides:
write in class MeteredOutputStream
Throws:
IOException


Copyright (c) 2007-2009 North Concepts Inc. All Rights Reserved.