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

Brian Burkhalter brian.burkhalter at oracle.com
Mon Oct 1 21:44:04 UTC 2018


This patch implements a method InputStream.skipNBytes() instead of skipFully() based on the supposition that this name is less likely to conflict with existing subclasses, e.g., [1]. There is some inconsistency however with respect to the description of the method readNBytes() [2], which may return fewer than N bytes if end of stream is reached first.

If we converge on a solution in this thread I’ll file a CSR.



[1] https://developer.ibm.com/static/site-id/155/maximodev/7609/maximocore/businessobjects/psdi/iface/webservices/action/bytecode/ClassReader.html
[2] https://download.java.net/java/early_access/jdk12/docs/api/java.base/java/io/InputStream.html#readNBytes(byte[],int,int)

More information about the core-libs-dev mailing list