JavaScript is disabled on your browser.
javax.servlet.http

Class HttpServletResponseWrapper

  • All Implemented Interfaces:
    HttpServletResponse, ServletResponse


    public class HttpServletResponseWrapper
    extends ServletResponseWrapper
    implements HttpServletResponse 
    Provided as a convenience to a developer that wishes to write an adapter to an HttpServletResponse Object. By Default it passes all methods that are part of the HttpServletResponse interface to the underlying implementation
    Since:
    2.3
    • Constructor Detail

      • HttpServletResponseWrapper

        public HttpServletResponseWrapper(HttpServletResponse response)
        Create a new HttpServletResponseWrapper to act as an adapter for the supplied HttpServletResponse. The Default behavior is to pass all methods that are part of the HttpServletResponse interface through to the underlying object
        Parameters:
        response - the response to be wrapped
        Throws:
        java.lang.IllegalArgumentException - if response is null
    • Method Detail

      • addCookie

        public void addCookie(Cookie cookie)
        By default passes the call to the underlying HttpServletResponse
        Specified by:
        addCookie in interface HttpServletResponse
        Parameters:
        cookie - the cookie to be added
      • containsHeader

        public boolean containsHeader(java.lang.String name)
        By default passes the call to the underlying HttpServletResponse
        Specified by:
        containsHeader in interface HttpServletResponse
        Parameters:
        name - the name of the header filed
      • encodeURL

        public java.lang.String encodeURL(java.lang.String url)
        By default passes the call to the underlying HttpServletResponse
        Specified by:
        encodeURL in interface HttpServletResponse
        Parameters:
        url - the URL to be encoded
        Returns:
        the URL with any necessary session information added
      • encodeUrl

        public java.lang.String encodeUrl(java.lang.String url)
        Deprecated. use encodeURL()
        By default passes the call to the underlying HttpServletResponse
        Specified by:
        encodeUrl in interface HttpServletResponse
        Parameters:
        url - the URL to be encoded
        Returns:
        the URL with any necessary session information added
      • sendError

        public void sendError(int status,
         java.lang.String message)
         throws java.io.IOException
        By default passes the call to the underlying HttpServletResponse
        Specified by:
        sendError in interface HttpServletResponse
        Parameters:
        status - The error code
        message - A descriptive error message
        Throws:
        java.io.IOException
      • sendError

        public void sendError(int status)
         throws java.io.IOException
        By default passes the call to the underlying HttpServletResponse
        Specified by:
        sendError in interface HttpServletResponse
        Parameters:
        status - The error code
        Throws:
        java.io.IOException
      • sendRedirect

        public void sendRedirect(java.lang.String location)
         throws java.io.IOException
        By default passes the call to the underlying HttpServletResponse
        Specified by:
        sendRedirect in interface HttpServletResponse
        Throws:
        java.io.IOException - if an i/o error occurs
      • setDateHeader

        public void setDateHeader(java.lang.String name,
         long date)
        By default passes the call to the underlying HttpServletResponse
        Specified by:
        setDateHeader in interface HttpServletResponse
        Parameters:
        name - The name of the header field
        date - The date in milliseconds since January 1, 1970, 00:00:00 GMT
      • addDateHeader

        public void addDateHeader(java.lang.String name,
         long date)
        By default passes the call to the underlying HttpServletResponse
        Specified by:
        addDateHeader in interface HttpServletResponse
      • setHeader

        public void setHeader(java.lang.String name,
         java.lang.String value)
        By default passes the call to the underlying HttpServletResponse
        Specified by:
        setHeader in interface HttpServletResponse
        Parameters:
        name - The name of the header field
        value - The (new) value of the header field
      • addHeader

        public void addHeader(java.lang.String name,
         java.lang.String value)
        By default passes the call to the underlying HttpServletResponse
        Specified by:
        addHeader in interface HttpServletResponse
      • setIntHeader

        public void setIntHeader(java.lang.String name,
         int value)
        By default passes the call to the underlying HttpServletResponse
        Specified by:
        setIntHeader in interface HttpServletResponse
        Parameters:
        name - The name of the header field
        value - The (new) value of the header field
      • addIntHeader

        public void addIntHeader(java.lang.String name,
         int value)
        By default passes the call to the underlying HttpServletResponse
        Specified by:
        addIntHeader in interface HttpServletResponse
      • getStatus

        public int getStatus()
        By default passes the call to the underlying HttpServletResponse
        Specified by:
        getStatus in interface HttpServletResponse
        Since:
        3.0
      • getHeader

        public java.lang.String getHeader(java.lang.String name)
        By default passes the call to the underlying HttpServletResponse
        Specified by:
        getHeader in interface HttpServletResponse
        Since:
        3.0
      • getHeaders

        public java.util.Collection<java.lang.String> getHeaders(java.lang.String name)
        By default passes the call to the underlying HttpServletResponse
        Specified by:
        getHeaders in interface HttpServletResponse
        Since:
        3.0
      • getHeaderNames

        public java.util.Collection<java.lang.String> getHeaderNames()
        By default passes the call to the underlying HttpServletResponse
        Specified by:
        getHeaderNames in interface HttpServletResponse
        Since:
        3.0

AltStyle によって変換されたページ (->オリジナル) /