Class ServletResponseWrapper

  • All Implemented Interfaces:
    javax.servlet.ServletResponse
    Direct Known Subclasses:
    HttpServletResponseWrapper

    public class ServletResponseWrapper
    extends Object
    implements javax.servlet.ServletResponse
    Helper class for wrapping ServletResponse instances. It enable to read previously written content.
    Author:
    antons
    • Constructor Detail

      • ServletResponseWrapper

        public ServletResponseWrapper​(javax.servlet.ServletResponse response)
    • Method Detail

      • getCharacterEncoding

        public String getCharacterEncoding()
        Specified by:
        getCharacterEncoding in interface javax.servlet.ServletResponse
      • getContentType

        public String getContentType()
        Specified by:
        getContentType in interface javax.servlet.ServletResponse
      • getOutputStream

        public javax.servlet.ServletOutputStream getOutputStream()
                                                          throws IOException
        Specified by:
        getOutputStream in interface javax.servlet.ServletResponse
        Throws:
        IOException
      • getContentInputStream

        public InputStream getContentInputStream()
      • setCharacterEncoding

        public void setCharacterEncoding​(String string)
        Specified by:
        setCharacterEncoding in interface javax.servlet.ServletResponse
      • setContentLength

        public void setContentLength​(int i)
        Specified by:
        setContentLength in interface javax.servlet.ServletResponse
      • setContentType

        public void setContentType​(String string)
        Specified by:
        setContentType in interface javax.servlet.ServletResponse
      • setBufferSize

        public void setBufferSize​(int i)
        Specified by:
        setBufferSize in interface javax.servlet.ServletResponse
      • getBufferSize

        public int getBufferSize()
        Specified by:
        getBufferSize in interface javax.servlet.ServletResponse
      • flushBuffer

        public void flushBuffer()
                         throws IOException
        Specified by:
        flushBuffer in interface javax.servlet.ServletResponse
        Throws:
        IOException
      • resetBuffer

        public void resetBuffer()
        Specified by:
        resetBuffer in interface javax.servlet.ServletResponse
      • isCommitted

        public boolean isCommitted()
        Specified by:
        isCommitted in interface javax.servlet.ServletResponse
      • reset

        public void reset()
        Specified by:
        reset in interface javax.servlet.ServletResponse
      • setLocale

        public void setLocale​(Locale locale)
        Specified by:
        setLocale in interface javax.servlet.ServletResponse
      • getLocale

        public Locale getLocale()
        Specified by:
        getLocale in interface javax.servlet.ServletResponse
      • setContentLengthLong

        public void setContentLengthLong​(long len)
        Specified by:
        setContentLengthLong in interface javax.servlet.ServletResponse