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

Brent Christian brent.christian at oracle.com
Tue Nov 13 21:18:36 UTC 2018


Along the same lines, if subclasses would typically benefit from 
overriding both skip() and skipNBytes(), how about we call out 
skipNBytes() in the skip() docs?  Either add a @see, or maybe append:

"Subclasses are encouraged to provide a more efficient implementation of 
this method" + " (as well as {@linkplain #skipNBytes()} )".

And do the same for skipNBytes().

-Brent

On 11/12/18 2:48 AM, Daniel Fuchs wrote:
> Wouldn't it be better to throw an IOException in this case,
> thus forcing subclasses that behave in this way to override
> skipFully as well?


More information about the core-libs-dev mailing list