RFR 8139206: Add InputStream readNBytes(int len)

Brian Burkhalter brian.burkhalter at oracle.com
Wed Jan 24 19:50:55 UTC 2018

On Jan 23, 2018, at 4:50 PM, Brian Burkhalter <brian.burkhalter at oracle.com> wrote:

> On Jan 23, 2018, at 1:19 AM, Weijun Wang <weijun.wang at oracle.com> wrote:
>> +     * Therefore, the method may be safely called with very large values of
>> +     * {@code len} provided sufficient memory is available.
>> What does "sufficient memory" mean? For len, or the number of available bytes?
> It means enough bytes for the collectivity of the intermediate and returned buffers. This is already stated to be proportional to ‘len’.

All right, to make sure this horse is truly dead here’s one more revision. The changes with respect to the previous revision are [1] and the overall changes versus the SCM base are [2]. The .02-.03 differences are:

A) Add an @implNote at line 368.
B) Minor memory use improvement at line 392.



[1] http://cr.openjdk.java.net/~bpb/8139206/webrev.02-03/
[2] http://cr.openjdk.java.net/~bpb/8139206/webrev.03/

More information about the core-libs-dev mailing list