On Friday 01 February 2008 05:10:30 Avik Sengupta wrote:
> We've looked at an NIO based POIFS earlier, which is not simple
> (relatively), but doable, but doesnt help at all ...

It's true that it's not simple, I made an attempt to do it once before but 
failed.

I wouldn't say that it doesn't help at all though.

  1. Lower memory usage due to not keeping a byte[] copy of all data at the
     POIFS level.
  2. If you don't ask for a DocumentInputStream for a given Document, the
     bytes don't even get read.  If you open a stream for a given Document and
     only read the first part, the rest of the bytes don't even get read.
  3. Not everyone is reading OLE2 documents from a File in the first place.

All three of these benefits apply *even if* the changes don't cascade into 
HSSF and the other libraries which sit on top of POIFS.

Of course the main beef I have with ByteBuffer is that it is limited to 
Integer.MAX_VALUE size, but I guess with OLE2 this isn't, in practice, going 
to be reached.  I imagine the maximum size for an OLE2 document is somewhat 
lower, although I don't actually know.

Daniel

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

Reply via email to