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


https://bugs.openjdk.java.net/browse/JDK-6516099
http://cr.openjdk.java.net/~bpb/6516099/webrev.00/

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.

Thanks,

Brian

[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