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:19:28 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:19 -------
BufferedInputStream is not blocking. From the javadoc:

"This iterated read continues until one of the following conditions becomes true:
    * The specified number of bytes have been read,
    * The read method of the underlying stream returns -1, indicating end-of-file
    * The available method of the underlying stream returns zero, indicating
that further input requests would block."

Furthermore, even if this did work, it should not be up to the user to supply a
BufferedInputStream. The POI methods are documented as taking an InputStream,
but fail when given a valid (albeit "slow") InputStream. The fix is simple--just
loop until you have the data you need (i.e. my patch).

Mime
View raw message