RFR 8139206: Add InputStream readNBytes(int len) (original) (raw)
Weijun Wang weijun.wang at oracle.com
Mon Jan 22 09:01:37 UTC 2018
- Previous message: RFR 8139206: Add InputStream readNBytes(int len)
- Next message: RFR 8139206: Add InputStream readNBytes(int len)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I wonder when readNBytes(n) will be useful if the return value has less than n bytes.
On Jan 22, 2018, at 4:52 PM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
On 17/01/2018 16:24, Brian Burkhalter wrote: : A negative value of ‘len’ will now cause an IllegalArgumentException instead of an IndexOutOfBoundsException. Also some verbiage has been improved. http://cr.openjdk.java.net/~bpb/8139206/webrev.01/ The updated version looks good. I just wonde about the "For example ..." in the @throws OOME description. The API can't be called with a len > Integer.MAXVALUE so this example could be confusing - I think just drop that sentence. Minor formatting in passing. At L128 and L339 it would be easier to read if the "throws IOException" were on the previous line. Also L355 might be a bit clear if the Math.min was indented (have to look twice to see that it's not in the while body). -Alan
- Previous message: RFR 8139206: Add InputStream readNBytes(int len)
- Next message: RFR 8139206: Add InputStream readNBytes(int len)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]