void read(InputStream in) throws IOException, WrongFormatException {
    myDataMap.clear();
    myContextMaxStamps.clear();
    myValueStamps.clear();

    DataInput dataIn = new DataInputStream(in);
    int formatVersion = dataIn.readInt();
    if (formatVersion != FORMAT_VERSION_NUMBER){
      throw new WrongFormatException();
    }

    DataInputOutputUtilRt.readSeq(dataIn, () -> {
      myDataMap.put(IOUtil.readUTF(dataIn),
                    new ArrayDeque<>(DataInputOutputUtilRt.readSeq(dataIn, () -> IOUtil.readUTF(dataIn))));
      return null;
    });

    readStringIntMap(dataIn, myContextMaxStamps);

    DataInputOutputUtilRt.readSeq(dataIn, () -> {
      Object2IntMap<String> map = new Object2IntOpenHashMap<>();
      map.defaultReturnValue(-1);
      myValueStamps.put(IOUtil.readUTF(dataIn), map);
      readStringIntMap(dataIn, map);
      return null;
    });
  }
void read(InputStream in)