com.northconcepts.datapipeline.throttle
Class ThrottledInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
com.northconcepts.datapipeline.meter.MeteredInputStream
com.northconcepts.datapipeline.throttle.ThrottledInputStream
- All Implemented Interfaces:
- Metered, Throttled, Closeable
public class ThrottledInputStream
- extends MeteredInputStream
- implements Throttled
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ThrottledInputStream
public ThrottledInputStream(InputStream in,
int unitsPerSecond)
getThrottle
public Throttle getThrottle()
- Specified by:
getThrottle in interface Throttled
read
public int read()
throws IOException
- Overrides:
read in class MeteredInputStream
- Throws:
IOException
read
public int read(byte[] b,
int off,
int len)
throws IOException
- Overrides:
read in class MeteredInputStream
- Throws:
IOException
Copyright (c) 2007-2009 North Concepts Inc. All Rights Reserved.