public static ReplicateBlobRequest readFrom(DataInputStream stream, ClusterMap map) throws IOException {
    short version = stream.readShort();
    switch (version) {
      case VERSION_1:
        return ReplicateBlobRequest_V1.readFrom(stream, map);
      case VERSION_2:
        return ReplicateBlobRequest_V2.readFrom(stream, map);
      default:
        throw new IllegalStateException("Unknown ReplicateBlob Request version " + version);
    }
  }
Deserialize {@link ReplicateBlobRequest} from a given {@link DataInputStream}.
@param stream The stream that contains the serialized bytes.
@param map The {@link ClusterMap} to help build {@link BlobId}.
@return A deserialized {@link ReplicateBlobRequest}.
@throws IOException Any I/O Errors.
ambry-protocol/src/main/java/com/github/ambry/protocol/ReplicateBlobRequest.java