@Override
  protected void prepareBuffer() {
    super.prepareBuffer();
    if (partitionResponseInfoList != null) {
      bufferToSend.writeInt(partitionResponseInfoList.size());
      for (BatchDeletePartitionResponseInfo partitionResponseInfo : partitionResponseInfoList) {
        partitionResponseInfo.writeTo(bufferToSend);
      }
    } else {
      bufferToSend.writeInt(0);
    }
  }
Reads from a stream and constructs a {@link BatchDeleteResponse}.
@param stream the {@link DataInputStream} to read from
@param clusterMap the {@link ClusterMap} to use
@return the constructed {@link BatchDeleteResponse}
@throws IOException
ambry-protocol/src/main/java/com/github/ambry/protocol/BatchDeleteResponse.java