Code Review Request for two pass signing
Sean Mullan
sean.mullan at oracle.com
Tue Apr 19 08:18:51 PDT 2011
On 04/19/2011 10:34 AM, Alan Bateman wrote:
> Sean Mullan wrote:
>> :
>> Right, but the code throws an IOException if the number of bytes
>> transferred is not equal to what was requested (the 2nd argument). Are
>> you suggesting it would be more accurate to use '<' since the method
>> can never transfer more than requested?
> I would use a loop to ensure that the entire content is transferred
> rather than throwing IOException.
Got you. Does this look ok:
for (long position = 0; position < remainderStart;) {
position += source.transferTo(position,
remainderStart, dest);
}
--Sean
More information about the jigsaw-dev
mailing list