public static ReplicateBlobResponse readFrom(DataInputStream stream) throws IOException {
    RequestOrResponseType type = RequestOrResponseType.values()[stream.readShort()];
    if (type != RequestOrResponseType.ReplicateBlobResponse) {
      throw new IllegalArgumentException("The type of request response is not compatible");
    }
    short versionId = stream.readShort();
    int correlationId = stream.readInt();
    String clientId = Utils.readIntString(stream);
    ServerErrorCode error = ServerErrorCode.values()[stream.readShort()];
    if (versionId != Version_V1) {
      throw new IllegalArgumentException("Unexpected ReplicateBlobResponse version " + versionId);
    }
    return new ReplicateBlobResponse(correlationId, clientId, error);
  }
Deserialize {@link ReplicateBlobResponse} from a given {@link DataInputStream}.
@param stream The stream that contains the serialized bytes.
@return A deserialized {@link ReplicateBlobResponse}.
@throws IOException Any I/O Errors.
ambry-protocol/src/main/java/com/github/ambry/protocol/ReplicateBlobResponse.java