Hi Brent, That is exactly why version .00 of the patch implemented skipNBytes() in a fixed way in terms of read(). I think that there is a good compromise however and I shall update the patch accordingly.
Thanks, Brian > On Oct 22, 2018, at 12:55 PM, Brent Christian <brent.christ...@oracle.com> > wrote: > > 562 public void skipNBytes(long n) throws IOException { > 563 if (n > 0 && skip(n) != n) { > 564 throw new EOFException("End of stream before enough bytes > skipped"); > 565 } > 566 } > > If an overrided skip() method were to skip < n bytes but not yet be at EOF, > which I think the skip() spec allows, then wouldn't skipNBytes() throw an > EOFException ?