@Override
  public void setDigestAlgorithm(String digestAlgorithm) throws NoSuchAlgorithmException {
    if (callbackWrapper != null) {
      throw new IllegalStateException("Cannot create a digest because some content may have been consumed");
    }
    digest = MessageDigest.getInstance(digestAlgorithm);
  }
{@inheritDoc}
<p/>
This function can only be called before {@link #readInto(AsyncWritableChannel, Callback)}.
@param digestAlgorithm the digest algorithm to use.
@throws NoSuchAlgorithmException if the {@code digestAlgorithm} does not exist or is not supported.
@throws IllegalStateException if {@link #readInto(AsyncWritableChannel, Callback)} has already been called.
ambry-rest/src/main/java/com/github/ambry/rest/NettyRequest.java