One thing to keep in mind is whether it can be shared between
processes, which I don't think you can do with
java.nio.MappedByteBuffer. The other issue with this is that for small
files it probably isn't an issue but large files will consume a
significant amount of the virtual address space that an application may
need( same issues exist for users of shared memory).
V
John C. Bollinger wrote:
> wrote:
>
> > I thought maybe RandomAccessFile might be a memory mapped file but
JB
> > pointed out this is not so in the thread: "How to initialize a big
> > (String-)Array fast?". I have not found a memory mapped file class
in
> > Java.
>
> You would want to consider the java.nio.MappedByteBuffer class, which
> does represent a view of a memory-mapped file.
>
> --
> John Bollinger
>