Support loading mmapable indices by path

Change-Id: Iaaeb8dc987c3da4b3f72e84535dce975a22444cf
diff --git a/src/main/java/de/ids_mannheim/korap/KrillIndex.java b/src/main/java/de/ids_mannheim/korap/KrillIndex.java
index e19ebd1..2210167 100644
--- a/src/main/java/de/ids_mannheim/korap/KrillIndex.java
+++ b/src/main/java/de/ids_mannheim/korap/KrillIndex.java
@@ -3,6 +3,7 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.nio.ByteBuffer;
+import java.nio.file.Path;
 import java.time.LocalDate;
 // Java core classes
 import java.util.ArrayList;
@@ -44,6 +45,7 @@
 import org.apache.lucene.search.spans.Spans;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.store.RAMDirectory;
+import org.apache.lucene.store.MMapDirectory;
 import org.apache.lucene.util.Bits;
 import org.apache.lucene.util.BytesRef;
 import org.apache.lucene.util.FixedBitSet;
@@ -225,6 +227,19 @@
 
 
     /**
+     * Constructs a new KrillIndex bound to a persistant index,
+     * that will be lifted as an mmap.
+     * 
+     * @param path
+     *            A path pointing to an mmapable index
+     * @throws IOException
+     */
+    public KrillIndex (Path path) throws IOException {
+        this.directory = new MMapDirectory(path);
+    };
+    
+
+    /**
      * Get the version number of the index.
      * 
      * @return A string containing the version number.