You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2005/06/23 17:51:26 UTC
DO NOT REPLY [Bug 35486] New: -
File with size different of modulos 512 or 0x200
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: poi-dev@jakarta.apache.org
ReportedBy: c.dupuis@type3.com
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: poi-dev-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/