> On 8 Oct 2015, at 10:46, Chris Hegarty <chris.hega...@oracle.com> wrote:
>> It reads at most “seqlen" bytes, so the array may be larger than necessary, 
>> which might be ok depending on whether one can trust "seqlen”.
> 
> We do no trust ‘seqlen’. :-(
> 

Good!


>> The following pattern occurs a few times:
>> 
>> byte[] b = is.readAllBytes();
>> if (len !- -1 && b.length != len) throw new EOFException(…)
>> 
>> A further useful addition to consider would be an IS.readFulyl(int 
>> expectedLength).
> 
> Yes, I think a variant of readNBytes(long expectedLength),
> would  be a useful addition. I can file a bug and add it to
> the I/O grab bag, 6852033 [1]. Then a further round of
> cleanup could possibly remove IOUtils completely.
> 

Ok.

Paul.

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to