org.apache.hadoop.tools.util
Class ThrottledInputStream
java.lang.Object
java.io.InputStream
org.apache.hadoop.tools.util.ThrottledInputStream
- All Implemented Interfaces:
- Closeable
public class ThrottledInputStream
- extends InputStream
ThrottledInputStream
public ThrottledInputStream(InputStream rawStream)
ThrottledInputStream
public ThrottledInputStream(InputStream rawStream,
long maxBytesPerSec)
read
public int read()
throws IOException
- Specified by:
read
in class InputStream
- Throws:
IOException
read
public int read(byte[] b)
throws IOException
- Overrides:
read
in class InputStream
- Throws:
IOException
read
public int read(byte[] b,
int off,
int len)
throws IOException
- Overrides:
read
in class InputStream
- Throws:
IOException
getTotalBytesRead
public long getTotalBytesRead()
getBytesPerSec
public long getBytesPerSec()
getTotalSleepTime
public long getTotalSleepTime()
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- Overrides:
close
in class InputStream
- Throws:
IOException
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2014 InMobi. All rights reserved.