I fell into the exact same trap as Riven did url=http://www.java-gaming.org/index.php/topic,22574.0[/url].
What is the point of this class existing if the default method implementations are so stupid
FilterInputStream is similarly flawed in that read(byte[]) invokes read(byte[],offset,len), resulting in it invoking your subclass implementation potentially causing unintended behaviour.
Thereās a hint in the javadoc that this flawed behaviour is to compensate for a stupid implementation in FilterInputStreamās known subclasses:
These Filter classes should be such trivial wrapper implementations it boggles my mind how they ended up having such convoluted & downright broken behaviour.
They should both be deprecated, and flagged with a big āDO NOT USE THESE CLASSES, THEYāRE FUNCTIONALLY USELESS/BROKENā warning.