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=11010>.
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=11010

POI failed to read just created empty Excel file with Unicode sheet name





------- Additional Comments From [EMAIL PROTECTED]  2002-07-29 19:14 -------
The problem is still alive after the patch was back.
In the attach the maker of the BUG and two examples.
As I see, it is not the size problem, and not Unicode problem,
as Glen maked this problem was before.

My assumption and suggestion on this error are below.
What do you think about it?


My assumption of this error is here:
For some reasons we have to make the workbook to be at least 4096 bytes
but if we have such workbook we fill the end of it with zeros (many zeros)

It is not good:
if the length( all zero records ) % 4 = 1
e.g.: any zero record would be readed as  4 bytes at once ( 2 - id and 2 - 
size ).
And the last 1 byte will be readed WRONG ( the id must be 2 bytes )

The suggestion:
So we should better to check if the sid is zero and not to read more data
The zero sid shows us that rest of the stream data is a fake to make workbook 
certain size.
( As in the sample HSSFEventFactory.java attached )

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to