class MemoryMappedFileImpl implements MemoryMappedFile {

    @Override
    public ByteBuffer getBuffer(int size) throws IOException {
        if (raf == null) {
            raf = new RandomAccessFile(file, "rw");
        }
        return raf.getChannel().map(FileChannel.MapMode.READ_WRITE, 0, size);
    }

    public  MemoryMappedFileImpl(File file);

}