static CosmosUpdateTimeFindToken fromBytes(DataInputStream inputStream) throws IOException {
    CosmosUpdateTimeFindToken cloudFindToken;
    DataInputStream stream = new DataInputStream(inputStream);
    short version = stream.readShort();
    switch (version) {
      case VERSION_0:
        FindTokenType type = FindTokenType.values()[stream.readShort()];
        long lastUpdateTime = stream.readLong();
        long bytesRead = stream.readLong();
        int numBlobs = stream.readShort();
        Set<String> blobIds = new HashSet<>();
        while (numBlobs > 0) {
          int blobIdLength = stream.readShort();
          byte[] blobIdBytes = new byte[blobIdLength];
          stream.read(blobIdBytes, 0, blobIdLength);
          blobIds.add(new String(blobIdBytes));
          numBlobs--;
        }
        cloudFindToken = new CosmosUpdateTimeFindToken(version, lastUpdateTime, bytesRead, blobIds);
        break;
      default:
        throw new IllegalStateException("Unknown version: " + version);
    }
    return cloudFindToken;
  }
Utility to construct a previously serialized {@code CloudFindToken} from input stream.
@param inputStream {@code DataInputStream} from which to read the token.
@return deserialized {@code CloudFindToken} object.
@throws IOException
ambry-cloud/src/main/java/com/github/ambry/cloud/azure/CosmosUpdateTimeFindToken.java