Class HttpServletResponseWrapper

java.lang.Object
javax.servlet.ServletResponseWrapper
javax.servlet.http.HttpServletResponseWrapper
All Implemented Interfaces:
HttpServletResponse, ServletResponse

public class HttpServletResponseWrapper
extends ServletResponseWrapper
implements HttpServletResponse
The HttpServletResponseWrapper API.
Author:
Manfred Riem ([email protected])
  • Constructor Details

  • Method Details

    • addCookie

      public void addCookie​(Cookie cookie)
      Add the cookie.
      Specified by:
      addCookie in interface HttpServletResponse
      Parameters:
      cookie - the cookie.
    • addDateHeader

      public void addDateHeader​(java.lang.String name, long date)
      Add the date header.
      Specified by:
      addDateHeader in interface HttpServletResponse
      Parameters:
      name - the name.
      date - the date.
    • addHeader

      public void addHeader​(java.lang.String name, java.lang.String value)
      Add the header.
      Specified by:
      addHeader in interface HttpServletResponse
      Parameters:
      name - the name.
      value - the value.
    • addIntHeader

      public void addIntHeader​(java.lang.String name, int value)
      Add the int header.
      Specified by:
      addIntHeader in interface HttpServletResponse
      Parameters:
      name - the name.
      value - the value.
    • containsHeader

      public boolean containsHeader​(java.lang.String name)
      Contains the header.
      Specified by:
      containsHeader in interface HttpServletResponse
      Parameters:
      name - the name.
      Returns:
      true if it contains the given header, false otherwise.
    • encodeRedirectURL

      public java.lang.String encodeRedirectURL​(java.lang.String url)
      Encode the redirect URL.
      Specified by:
      encodeRedirectURL in interface HttpServletResponse
      Parameters:
      url - the redirect URL.
      Returns:
      the encoded redirect URL.
    • encodeRedirectUrl

      @Deprecated public java.lang.String encodeRedirectUrl​(java.lang.String url)
      Deprecated.
      Encode the redirect URL.
      Specified by:
      encodeRedirectUrl in interface HttpServletResponse
      Parameters:
      url - the redirect URL.
      Returns:
      the encoded redirect URL.
    • encodeURL

      public java.lang.String encodeURL​(java.lang.String url)
      Encode the URL.
      Specified by:
      encodeURL in interface HttpServletResponse
      Parameters:
      url - the URL.
      Returns:
      the encoded URL.
    • encodeUrl

      @Deprecated public java.lang.String encodeUrl​(java.lang.String url)
      Deprecated.
      Encode the URL.
      Specified by:
      encodeUrl in interface HttpServletResponse
      Parameters:
      url - the URL.
      Returns:
      the encoded URL.
    • getHeader

      public java.lang.String getHeader​(java.lang.String name)
      Get the header.
      Specified by:
      getHeader in interface HttpServletResponse
      Parameters:
      name - the name.
      Returns:
      the header, or null if not found.
    • getHeaders

      public java.util.Collection<java.lang.String> getHeaders​(java.lang.String name)
      Get the headers.
      Specified by:
      getHeaders in interface HttpServletResponse
      Parameters:
      name - the name.
      Returns:
      the headers.
    • getHeaderNames

      public java.util.Collection<java.lang.String> getHeaderNames()
      Get the header names.
      Specified by:
      getHeaderNames in interface HttpServletResponse
      Returns:
      the header names.
    • getStatus

      public int getStatus()
      Get the status.
      Specified by:
      getStatus in interface HttpServletResponse
      Returns:
      the status.
    • sendError

      public void sendError​(int status) throws java.io.IOException
      Send an error.
      Specified by:
      sendError in interface HttpServletResponse
      Parameters:
      status - the status code.
      Throws:
      java.io.IOException - when an I/O error occurs.
    • sendError

      public void sendError​(int status, java.lang.String message) throws java.io.IOException
      Send an error.
      Specified by:
      sendError in interface HttpServletResponse
      Parameters:
      status - the status code.
      message - the message.
      Throws:
      java.io.IOException - when an I/O error occurs.
    • sendRedirect

      public void sendRedirect​(java.lang.String location) throws java.io.IOException
      Send a redirect.
      Specified by:
      sendRedirect in interface HttpServletResponse
      Parameters:
      location - the location.
      Throws:
      java.io.IOException - when an I/O error occurs.
    • setDateHeader

      public void setDateHeader​(java.lang.String name, long date)
      Set the date header.
      Specified by:
      setDateHeader in interface HttpServletResponse
      Parameters:
      name - the name.
      date - the date.
    • setHeader

      public void setHeader​(java.lang.String name, java.lang.String value)
      Set the header.
      Specified by:
      setHeader in interface HttpServletResponse
      Parameters:
      name - the name.
      value - the value.
    • setIntHeader

      public void setIntHeader​(java.lang.String name, int value)
      Set the int header.
      Specified by:
      setIntHeader in interface HttpServletResponse
      Parameters:
      name - the name.
      value - the value.
    • setStatus

      public void setStatus​(int status)
      Set the status.
      Specified by:
      setStatus in interface HttpServletResponse
      Parameters:
      status - the status.
    • setStatus

      @Deprecated public void setStatus​(int status, java.lang.String message)
      Deprecated.
      Set the status.
      Specified by:
      setStatus in interface HttpServletResponse
      Parameters:
      status - the status code.
      message - the status message.