Dear POI Developers, I am looking at using POIFileSystem's DocumentInputStream class to read data. My data is scattered throughout a stream, and so I need random access. Looking the implementation, we see a DocumentInputStream._current_offset integer, which points to the current offset. Ideally, I would like to access this.
As far as I can tell, I can see three options for random access: (1) Just read the entire stream input a byte[] array, and read sections I need. This works, its fast, but is very memory inefficient. (2) Add an additional method to DocumentInputStream to set the offset (probably a bad idea), or change _current_offset from private to protected to allow to it to subclassed (better, but still involves modifying a POIFS class). (3) Write my own custom stream, with random access support, e.g. RandomAccessStream. More tricky, dont want to do this if I dont have to :-) Any suggestions for how to perform random access reads on a POI DocumentInputStream would be most appreciated. Best Regards, -- Kais -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.322 / Virus Database: 266.11.12 - Release Date: 17/05/2005 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta POI Project: http://jakarta.apache.org/poi/
