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=35486>. 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=35486 Summary: File with size different of modulos 512 or 0x200 Product: POI Version: 2.5 Platform: PC OS/Version: Windows XP Status: NEW Severity: normal Priority: P2 Component: POIFS AssignedTo: [email protected] ReportedBy: [EMAIL PROTECTED] When opening a file with POIFSFileSystem fs = new POIFSFileSystem(fis); if this file have a size not modulus 0x200 then an exception occured. It's seem that old Ole Document can have this size for example : 539 990 bytes (0x83D56). If the file is re save with new softwar, then the size is : 603 136 bytes (0x93400) I have done a patch in RawDataBlock _data = new byte[ POIFSConstants.BIG_BLOCK_SIZE ]; int count = IOUtils.readFully(stream, _data); if (count == -1) { _eof = true; } else if (count != POIFSConstants.BIG_BLOCK_SIZE) { String type = " byte" + ((count == 1) ? ("") : ("s")); /* throw new IOException("Unable to read entire block; " + count + type + " read; expected " + POIFSConstants.BIG_BLOCK_SIZE + " bytes"); */ System.err.println("Unable to read entire block; " + count + type + " read; expected " + POIFSConstants.BIG_BLOCK_SIZE + " bytes" ); } else { _eof = false; } -- 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: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta POI Project: http://jakarta.apache.org/poi/
