Class BufferedHttpServletResponse

  • All Implemented Interfaces:
    HttpServletResponse, ServletResponse

    public class BufferedHttpServletResponse
    extends HttpServletResponseWrapper
    Response wrapper used to capture HTML body for post-processing.
    Since:
    5.0.0
    Version:
    $Revision: 25002 $ $Date: 2022-05-11 13:09:33 -0300 (Wed, 11 May 2022) $
    • Constructor Detail

      • BufferedHttpServletResponse

        public BufferedHttpServletResponse​(HttpServletResponse response)
    • Method Detail

      • getOutputString

        public java.lang.String getOutputString()
                                         throws java.io.IOException
        Returns the output body for this response as a string.
        Returns:
        the output body for this response. An empty string is returned if nothing was sent to output.
        Throws:
        java.io.IOException - if an I/O error occurred while providing the output body.
        Since:
        5.0.0
      • getOutputByteArray

        public byte[] getOutputByteArray()
                                  throws java.io.IOException
        Returns the output body for this response as a byte array.
        Returns:
        the output body for this response. An empty array is returned if nothing was sent to output.
        Throws:
        java.io.IOException - if an I/O error occurred while providing the output body.
        Since:
        6.0.0