org.apache.hadoop.util
Class LimitInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.apache.hadoop.util.LimitInputStream
- All Implemented Interfaces:
- Closeable
@InterfaceStability.Unstable
public final class LimitInputStream
- extends FilterInputStream
Copied from guava source code v15 (LimitedInputStream)
Guava deprecated LimitInputStream in v14 and removed it in v15. Copying this class here
allows to be compatible with guava 11 to 15+.
Originally: org.apache.hadoop.hbase.io.LimitInputStream
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LimitInputStream
public LimitInputStream(InputStream in,
long limit)
available
public int available()
throws IOException
- Overrides:
available
in class FilterInputStream
- Throws:
IOException
mark
public void mark(int readLimit)
- Overrides:
mark
in class FilterInputStream
read
public int read()
throws IOException
- Overrides:
read
in class FilterInputStream
- Throws:
IOException
read
public int read(byte[] b,
int off,
int len)
throws IOException
- Overrides:
read
in class FilterInputStream
- Throws:
IOException
reset
public void reset()
throws IOException
- Overrides:
reset
in class FilterInputStream
- Throws:
IOException
skip
public long skip(long n)
throws IOException
- Overrides:
skip
in class FilterInputStream
- Throws:
IOException
Copyright © 2014 Apache Software Foundation. All Rights Reserved.