On Mon, Jul 6, 2009 at 3:33 AM, Xb<[email protected]> wrote: > > Thanks a lot Josh. It solved the problem, but I still have a question about > your close method. Is the file mapped in memory so there is no IO?
As far as I understand, RandomAccessFile uses the same OS file handles that FileOutputStream does. The code example takes advantage of RandomAccessFile's ability to do seek operations on the underlying OS file handle. If you want to use 'file mapped memory' you might use the map() method from FileChannel (you can get a FileChannel from the getChannel() method on RandomAccessFile). However, there is probably little point in using memory mapped files in the context of POI for the reasons mentioned in the previous post. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
