Chris said:
Anyone have any pointers on Large File Support (i.e. > 2 GB).
java.io.File.Length() is a long, 32bit, and will not return the size
properly.
A long in Java is 64 bits, but the problem is a lot more complicated
than that.
There are a few issues that need to be addressed within the JRE to
properly handle such large files:
1) Does the underlying filesystem support files this large? Many less
recent filesystems don't.
2) Is the JRE using the correct OS APIs to handle large files? As the
concept of filesystems being able to handle such large files is fairly
recent, many of the core APIs are build around 32 bit integer values.
In order to retain backward compatibility, many OS's, instead of
changing the existing API calls that are using 32 bit ints, added new
calls that support 64 bit ints. If the JRE is still using the original
API, and not the newer 64-bit capable calls, then even if you have a
64-bit enabled filesystem you're still not going to be able to handle
large files.
HTH!
Brad BARCLAY