poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Darien Kindlund <...@kindlund.com>
Subject [2.0-RC1-20031102] Potential Bug? Zero Byte OLE Streams (DocumentEntry)?
Date Thu, 19 Feb 2004 00:45:15 GMT
Hello,

First off, to the developers, thanks so much for providing this open 
source initiative!  I've been a long-time lurker; first time poster.

Couple of issues:

#1:
Initial Setup: Using 2.0-RC1-20031102 source; utilizing the 
org.apache.poifs.filesystem.* libraries exclusively.

After getting hands on with the (non-event-driven) way of 
reading/writing OLE streams/storages (aka Documents/Directories in POIFS 
speak)... I noticed that POIFS has trouble either *creating* or 
*reading* ZERO byte (or empty) OLE streams (Documents).

Here's an easy example:

1) Create a POIFS filesystem.
2) Create 2 DocumentEntry's, one with some bytes, the other with 0 bytes.
3) Save the POIFS filesystem as a file.
4) Attempt to view the subsequent POIFS filesystem in the 
org.apache.poi.contrib.poibrowser.POIBrowser
5) ... and you get this error message:
java.io.IOException: Cannot remove block[ 0 ]; out of range
No POI filesystem(s) to display.

... by simply removing the 0 byte DocumentEntry from the POIFS 
filesystem, the subsequent saved copy is now readable.

I'm pretty sure the problem resides somewhere in the following function:
public POIFSDocument(final String name, final InputStream stream);
... within org.apache.poi.poifs.filesystem.

My guess, is that the "block[ 0 ]" referred to in the error message may 
be from the "DocumentBlock block" instantiation within the while loop... 
but not 100% sure.

- Can anyone confirm/deny that this problem exists?
- If it does exist, can anyone indicate if this problem has been fixed?

#2:
Has anyone done a POI integrated port of the Escher filesystem?  
(KOffice v1.3 has a decent start in their powerpoint.cc source code... 
at least in determining Escher records/containers/atoms, etc.)

Thanks in advance,
Darien Kindlund



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


Mime
View raw message