On 8/1/03 6:58 AM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>> Slow input stream patch, bug 13478 >> ... >> for (;;) { >> int got = in.read(b, off + total, len - total); >> if (got < 0) { >> return (total == 0) ? -1 : total; >> } else { >> total += got; >> if (total == len) >> return total; >> } >> } > > Hi Avik, > > thanks for the patch! I suggest that the loop waits for a moment when read() > received less bytes than expected. Otherwise it would be a waste of CPU > cycles on very slow streams. > > Best regards > Rainer Klute That and it needs a timeout as well. -- Andrew C. Oliver http://www.superlinksoftware.com/poi.jsp Custom enhancements and Commercial Implementation for Jakarta POI http://jakarta.apache.org/poi For Java and Excel, Got POI? --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta POI Project: http://jakarta.apache.org/poi/