public void doLoad(String path) {
        FileInputStream inputStream = null;
        ObjectInputStream deserializer = null;
        try {
            inputStream = new FileInputStream(path);
            deserializer = new ObjectInputStream(inputStream);
            dictionary = (Map<String, TreeSet<Document>>) deserializer.readObject();
        } catch (FileNotFoundException e) {
            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
        } catch (IOException e) {
            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
        } catch (ClassNotFoundException e) {
            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
        } finally {
            if (inputStream != null) {
                try {
                    inputStream.close();
                } catch (IOException e) {
                    // no op
                }
            }

            if (deserializer != null) {
                try {
                    inputStream.close();
                } catch (IOException e) {
                    // no op
                }
            }
        }
    }