Well, with a MappedByteBuffer (or any DirectByteBuffer), if you want to manipulate the data as a Java type (e.g. byte[]) you have to copy the data into the heap. byte[] cannot exist outside of the heap.
Still, I wonder why they're using a MappedByteBuffer in the first place if they're working with the data in the Java heap.
Still, I wonder why they're using a MappedByteBuffer in the first place if they're working with the data in the Java heap.