That would be a workaround, but it annoys me when you have to make a workaround for something that is available in the language it set out to replace.
And if you are doing something like nearest cluster mapping, or anything else where you process your data in linear order you are not going to get the optimized cache locality. Plus you can't read the file with mmap if your data is from there.
I agree that Java is not the best tool for things like analyzing mmap'ed data. Java replaces C++ by being better in some things, not all.
I would go further and say that if your job is analyzing terabytes of memory-mapped binary files, maybe C++ is not optimal either, and investing in specialized languages like Shakti/K would pay off quickly.
And if you are doing something like nearest cluster mapping, or anything else where you process your data in linear order you are not going to get the optimized cache locality. Plus you can't read the file with mmap if your data is from there.