Well, I do not see a reason not to use java.nio.MappedByteBuffer even if the files are bigger the Integer.MAX_VALUE.
Evidently you will not be allowed to define a single MappedByteBuffer for the whole file. But you could have several MappedByteBuffers accessing different regions of the file.
The definition of position and size in FileChannenel.map are of type long, which implies you can provide values over Integer.MAX_VALUE, the only thing you have to take care of is that the size of your buffer will not be bigger than Integer.MAX_VALUE.
Therefore, you could define several maps like this:
buffer[0] = fileChannel.map(FileChannel.MapMode.READ_WRITE,0,2147483647L);
buffer[1] = fileChannel.map(FileChannel.MapMode.READ_WRITE,2147483647L, Integer.MAX_VALUE);
buffer[2] = fileChannel.map(FileChannel.MapMode.READ_WRITE, 4294967294L, Integer.MAX_VALUE);
...
In summary, the size cannot be bigger than Integer.MAX_VALUE, but the start position can be anywhere in your file.
In the Book Java NIO, the author Ron Hitchens states:
Accessing a file through the
memory-mapping mechanism can be far
more efficient than reading or writing
data by conventional means, even when
using channels. No explicit system
calls need to be made, which can be
time-consuming. More importantly, the
virtual memory system of the operating
system automatically caches memory
pages. These pages will be cached
using system memory andwill not
consume space from the JVM's memory
heap.
Once a memory page has been made valid
(brought in from disk), it can be
accessed again at full hardware speed
without the need to make another
system call to get the data. Large,
structured files that contain indexes
or other sections that are referenced
or updated frequently can benefit
tremendously from memory mapping. When
combined with file locking to protect
critical sections and control
transactional atomicity, you begin to
see how memory mapped buffers can be
put to good use.
I really doubt that you will find a third-party API doing something better than that. Perhaps you may find an API written on top of this architecture to simplify the work.
Don't you think that this approach ought to work for you?