6516099: InputStream.skipFully(int k) to skip exactly k bytes

Brian Burkhalter brian.burkhalter at oracle.com
Thu Nov 8 20:52:57 UTC 2018


Hi Daniel,

> On Nov 8, 2018, at 1:50 AM, Daniel Fuchs <daniel.fuchs at oracle.com> wrote:
> 
> So FWIW my point was that there's nothing that you can really
> guarantee in InputSteam::skipFully() if a subclass implementation of
> skip() uses negative number to e.g. signal abnormal conditions
> (such as EOF?). And I wonder if that should warrant a disclaimer
> in the API doc of InputStream::skipFully (maybe an @implSpec?)

I don’t know about having an explicit disclaimer; that seems a little strange to me. If the new method is defined in terms of skip() the I would think that it is implicit that misbehavior of the latter would cause problems.

Thanks,

Brian


More information about the core-libs-dev mailing list