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 Sun, 08 Jul 2007 12:04:15 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.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://issues.apache.org/bugzilla/show_bug.cgi?id=13478


paulk@asert.com.au changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |
            Version|2.0-dev                     |3.0




------- Additional Comments From paulk@asert.com.au  2007-07-08 05:04 -------
It doesn't look like the code in RawDataBlock has been changed to cater for the
error mentioned here. If you are reading from a file system that happens to
cache data in blocks of a multiple of 512, then everything will work fine - and
the error checking code should never be called. If you read the spreadsheet from
a jar, from a socket, from a web server stream etc., then the error handling
code will prematurely throw the exception. It seems the correct way to fix this
would be just to remove the erroneous error checking code:

    public RawDataBlock(InputStream stream) throws IOException
    {
        _data = new byte[512];
        int count = IOUtils.readFully(stream, _data);
        _eof = count == -1;
    }

And let IOUtils do its job. Let mme know if you want this as a patch.
Tested against 3.0.1-FINAL.



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message