code: private Map deserializeMap(File file) {
          Map<?,?> map;
          try(ObjectInputStream is = new ObjectInputStream(new BufferedInputStream(new FileInputStream(file)))) {
              map = (Map<?,?>) is.readObject();
          } catch (Exception e) {
              logger.error(e.getLocalizedMessage(), e);
              return null;
          }
          return map;
      }
docs: Deserialize a map
  @param file The file with the map.