RFR: 8255878: FilterInputStream is missing implementations of Java 9 InputStream methods [v2]

Daniel Fuchs dfuchs at openjdk.java.net
Sat Sep 4 00:42:47 UTC 2021

On Fri, 3 Sep 2021 23:19:22 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> This request proposes to modify `java.io.FilterInputStream` to override `readAllBytes()`, `readNBytes(int)`, `skipNBytes(long)`, and `transferTo(OutputStream)` in order to leverage any performance advantage that the wrapped stream might have over the `java.io.InputStream` implementations of these methods.
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>   8255878: Add @implSpec where appropriate

This will probably break all existing subclasses that assume that they only need to override the single 
`int read()` method - because overriding this single method will now no longer be sufficient.

Did you conduct a survey of existing subclasses of FilterInputStream (recursively), in the JDK and elsewhere, to evaluate the impact of this change?


PR: https://git.openjdk.java.net/jdk/pull/5367

More information about the core-libs-dev mailing list