Package org.apache.hadoop.hbase.io
Class DelegatingInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.apache.hadoop.hbase.io.DelegatingInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
An input stream that delegates all operations to another input stream. The delegate can be
switched out for another at any time but to minimize the possibility of violating the InputStream
contract it would be best to replace the delegate only once it has been fully consumed.
For example, a ByteArrayInputStream, which is implicitly bounded by the size of the underlying byte array can be converted into an unbounded stream fed by multiple instances of ByteArrayInputStream, switched out one for the other in sequence.
Although multithreaded access is allowed, users of this class will want to take care to order operations on this stream and the swap out of one delegate for another in a way that provides a valid view of stream contents.
-
Field Summary
Fields inherited from class java.io.FilterInputStream
in
-
Constructor Summary
-
Method Summary
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, read, read, reset, skip
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
DelegatingInputStream
-
-
Method Details
-
getDelegate
-
setDelegate
-