code: public void setContentLength(final int contentLength) throws MaxMessageSizeExceededException {
          if (contentLength > this.maxAllowedContentLength) {
              throw new MaxMessageSizeExceededException("Content length exceeds the maximum allowed length");
          }
          this.contentLength = contentLength;
          this.payload = new byte[contentLength];
      }
docs: Set the expected content length of this message. This value comes from
  the Content-Length header and if it is exceeding the maximum allowed
  payload length then we will throw a
  {@link MaxMessageSizeExceededException}.
  
  @param contentLength
  the content length of the payload
  @throws MaxMessageSizeExceededException
  in case the payload exceeds the maximum allowed length.