I just tried 3.1-beta1 on one Word doc I have that is 28671 bytes, i.e. 55 
blocks, + 511 bytes.  Now that throws the following Exception

java.io.IOException: Cannot remove block[ 54 ]; out of range
        at 
org.apache.poi.poifs.storage.BlockListImpl.remove(BlockListImpl.java:104)
        at 
org.apache.poi.poifs.storage.BlockAllocationTableReader.fetchBlocks(BlockAllocationTableReader.java:190)
        at 
org.apache.poi.poifs.storage.BlockListImpl.fetchBlocks(BlockListImpl.java:129)
        at 
org.apache.poi.poifs.storage.SmallBlockTableReader.getSmallDocumentBlocks(SmallBlockTableReader.java:57)
        at 
org.apache.poi.poifs.filesystem.POIFSFileSystem.<init>(POIFSFileSystem.java:176)

if I add one byte to the byte array before parsing the file, it parses fine.

So, the change to RawDataBlock seems to have had no effect.

Antony



Bowesman Antony wrote:
> Using 3.0.2 FINAL, RawDataBlock still throws an IOException if the block read 
> is 
> not a 512 byte boundary.  (It's done this in all previous versions I've used)
> 
> Looking at the SVN trunk, it now does not throw the Exception (Javadoc 
> comments 
> says it will).  Is this all that is needed to fix the problem, just to ignore 
> and log the case or is there some other related changes needed?
> 
> Antony
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


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

Reply via email to