"Big" mapping support in future versions of Java?
Alan Bateman
Alan.Bateman at oracle.com
Mon Mar 31 10:42:18 UTC 2014
On 29/03/2014 11:06, Francis Galiegue wrote:
> Hello,
>
> One limit of Java, even in 8, is the inability to map files over 2 GB
> in one go; because of the definition of ByteBuffer, indices are
> limited to ints; even though arguments to FileChannel.map() are longs.
>
> Is there a plan to create a new set of classes in the future which
> would remove this limitation?
>
Back in JSR 203 / JDK 7 we did prototype a parallel hierarchy of large
buffers that used a long to index elements but it is ugly and we didn't
take this approach very far. It is an issue that will need to looked at
again sometime, possibility by allowing a file mapping to back a big
array or collection of primitive types. Nothing specifically planned at
moment (at least not to my knowledge).
-Alan.
More information about the nio-dev
mailing list