Add java API for mmap