poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 13478] - [PATCH] [RFE] POIFS, RawDataBlock: Missing workaround for low performance InputStreams
Date Fri, 13 Jun 2003 20:42:10 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13478>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13478

[PATCH] [RFE] POIFS, RawDataBlock: Missing workaround for low performance InputStreams





------- Additional Comments From chris@sixlegs.com  2003-06-13 20:42 -------
Tony, I don't think your patch is correct. It assumes that InputStream.read can
return zero, and bases the retrying/timeout on that fact.

InputStream.read will actually only ever return zero of that is the number of
bytes requested. Otherwise it will return -1 (EOF), a value greater than zero (#
bytes read), or throw an exception.

I believe that in the case of an HTTP timeout your stream will return -1, or at
least throw an exception, so my patch should work for you (maybe you can try it).

Mime
View raw message