Class FilterInputStream2

java.lang.Object
java.io.InputStream
org.apache.lucene.tests.mockfile.FilterInputStream2
All Implemented Interfaces:
Closeable, AutoCloseable

public class FilterInputStream2 extends InputStream
A FilterInputStream2 contains another InputStream, which it uses as its basic source of data, possibly transforming the data along the way or providing additional functionality.

Note: unlike FilterInputStream this class delegates every method by default. This means to transform read calls, you need to override multiple methods. On the other hand, it is less trappy: a simple implementation that just overrides close will not force bytes to be read one-at-a-time.