code: private void validateMaximumPayloadSize(int currentPayloadSize) throws PayloadMaxSizeExceededException {
  		int maximumPayloadSize = getMaximumPayloadSize();
  		if (currentPayloadSize > maximumPayloadSize) {
  			throw new PayloadMaxSizeExceededException(maximumPayloadSize, currentPayloadSize);
  		}
  	}
docs: Validate that the payload does not exceed the maximum size allowed.
  If the limit is exceeded, a PayloadMaxSizeExceededException is thrown.
  
  @param currentPayloadSize the total size of the payload in bytes
  @throws PayloadMaxSizeExceededException if the payload exceeds the maximum size allowed