> For the complete documentation index, see [llms.txt](https://amartyushov.gitbook.io/tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://amartyushov.gitbook.io/tech/programming-languages/java/io-nio/java-io-streams/input-streams/filterinputstream.md).

# FilterInputStream

The `FilterInputStream` is a base class for implementing your own filtering input streams. Basically it just overrides all methods in `InputStream` and passes all calls to any method on the `FilterInputStream` onto a wrapped `InputStream`. The wrapped `InputStream` is passed to the `FilterInputStream` in its constructor, like this:

```
FilterInputStream inputStream = new FilterInputStream(new FileInputStream("c:\\myfile.txt"));
```

The `FilterInputStream` class does not have any special behaviour. It is intended to be a base class for your own subclasses, but in my opinion you might as well just subclass `InputStream` directly.

Personally, I see no sensible purpose for this class. I cannot see that this class actually adds or changes any behaviour in `InputStream` except that it takes an `InputStream` in its constructor.
