public class RateLimitedInputStream extends FilterInputStream implements org.apache.hadoop.fs.Seekable
InputStream
which limits the rate at which reads are performed.in
Constructor and Description |
---|
RateLimitedInputStream(StreamType stream,
RateLimiter rateLimiter) |
Modifier and Type | Method and Description |
---|---|
long |
getPos() |
int |
read() |
int |
read(byte[] buffer,
int offset,
int length) |
void |
seek(long pos) |
boolean |
seekToNewSource(long targetPos) |
available, close, mark, markSupported, read, reset, skip
public RateLimitedInputStream(StreamType stream, RateLimiter rateLimiter)
public int read() throws IOException
read
in class FilterInputStream
IOException
public int read(byte[] buffer, int offset, int length) throws IOException
read
in class FilterInputStream
IOException
public void seek(long pos) throws IOException
seek
in interface org.apache.hadoop.fs.Seekable
IOException
public long getPos() throws IOException
getPos
in interface org.apache.hadoop.fs.Seekable
IOException
public boolean seekToNewSource(long targetPos) throws IOException
seekToNewSource
in interface org.apache.hadoop.fs.Seekable
IOException
Copyright © 2011–2019 The Apache Software Foundation. All rights reserved.