Update (03.10.2009): there was a bug with incorrect processing in the case of 'slow' underlying input stream. It's fixed and test suit is populated.
Update (16.09.2009): there was a bug within the class that caused buffer overflow. It is fixed now and test suit is populated.
I need a way to apply necessary replacement rules to the data provided by InputStream. Googling didn't show the one, so, I created a custom InputStream implementation that allows to do that - ReplaceFilterInputStream.
I offer the class for inclusion to commons-io (ticket IO-218), so, don't be surprised by the package name.
Here is the usage example: