public ConcurrentMap<String, Pair<Long, FindToken>> deserializeTokens(InputStream inputStream) throws IOException {
      CrcInputStream crcStream = new CrcInputStream(inputStream);
      DataInputStream stream = new DataInputStream(crcStream);
      ConcurrentMap<String, Pair<Long, FindToken>> peerTokens = new ConcurrentHashMap<>();
      try {
        short version = stream.readShort();
        if (version != VERSION_0) {
          logger.error("Invalid version found during remote peer token deserialization: " + version);
          return new ConcurrentHashMap<>();
        }
        while (stream.available() > Crc_Size) {
          // read the peer key: hostname:mountpoint
          String peerKey = Utils.readIntString(stream);
          // read the timestamp
          long timestamp = stream.readLong();
          // read remote replica token
          FindToken token = StoreFindToken.fromBytes(stream, keyFactory);
          peerTokens.put(peerKey, new Pair<>(timestamp, token));
          logger.info("Retrieve remote token " + peerKey + " : " + timestamp + " " + token.toString());
        }

        long computedCrc = crcStream.getValue();
        long readCrc = stream.readLong();
        if (computedCrc != readCrc) {
          logger.error("Crc mismatch during peer token deserialization, computed " + computedCrc + ", read " + readCrc);
          return new ConcurrentHashMap<>();
        }
        return peerTokens;
      } catch (IOException e) {
        logger.error("IO error deserializing remote peer tokens", e);
        return new ConcurrentHashMap<>();
      } finally {
        stream.close();
      }
    }
Deserialize the remote tokens
@param inputStream the input stream from the persistent file
@return the mapping from replicas to remote tokens
ambry-store/src/main/java/com/github/ambry/store/RemoteTokenTracker.java