Package org.apache.tika.io
Class BoundedInputStream
java.lang.Object
java.io.InputStream
org.apache.tika.io.BoundedInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
Deprecated.
This version of the Apache Tika library is deprecated. Use your own version of Apache Tika.
Very slight modification of Commons' BoundedInputStream
so that we can figure out if this hit the bound or not.
This relies on IOUtils' skip and read to try to fully
read/skip inputstream.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanDeprecated.voidmark(int readLimit) Deprecated.intread()Deprecated.intread(byte[] b) Deprecated.Invokes the delegate'sread(byte[])method.intread(byte[] b, int off, int len) Deprecated.Invokes the delegate'sread(byte[], int, int)method.voidreset()Deprecated.longskip(long n) Deprecated.Invokes the delegate'sskip(long)method.Methods inherited from class java.io.InputStream
available, close, markSupported, nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
BoundedInputStream
Deprecated.
-
-
Method Details
-
read
Deprecated.- Specified by:
readin classInputStream- Throws:
IOException
-
read
Deprecated.Invokes the delegate'sread(byte[])method.- Overrides:
readin classInputStream- Parameters:
b- the buffer to read the bytes into- Returns:
- the number of bytes read or -1 if the end of stream or the limit has been reached.
- Throws:
IOException- if an I/O error occurs
-
read
Deprecated.Invokes the delegate'sread(byte[], int, int)method. This does not have the same guarantees as IOUtil's readFully()...be careful.- Overrides:
readin classInputStream- Parameters:
b- the buffer to read the bytes intooff- The start offsetlen- The number of bytes to read- Returns:
- the number of bytes read or -1 if the end of stream or the limit has been reached.
- Throws:
IOException- if an I/O error occurs
-
skip
Deprecated.Invokes the delegate'sskip(long)method. As with InputStream generally, this does not guarantee reading n bytes. Use IOUtils' skipFully for that functionality.- Overrides:
skipin classInputStream- Parameters:
n- the number of bytes to skip- Returns:
- the actual number of bytes skipped
- Throws:
IOException- if an I/O error occurs
-
reset
Deprecated.- Overrides:
resetin classInputStream- Throws:
IOException
-
mark
public void mark(int readLimit) Deprecated.- Overrides:
markin classInputStream
-
hasHitBound
public boolean hasHitBound()Deprecated.
-