code: public static void setContentLength (@Nonnull final HttpServletResponse aHttpResponse,
                                         @Nonnegative final long nContentLength)
    {
      if (nContentLength < Integer.MAX_VALUE)
        aHttpResponse.setContentLength ((int) nContentLength);
      else
        aHttpResponse.setHeader (CHttpHeader.CONTENT_LENGTH, Long.toString (nContentLength));
    }
docs: Set the content length of an HTTP response. If the passed content length is a
  valid integer, <code>aHttpResponse.setContentLength</code> is invoked, else
  the HTTP header {@link CHttpHeader#CONTENT_LENGTH} is set manually.
  
  @param aHttpResponse
  The response to set the content length to
  @param nContentLength
  The content length to set