类 ViewImportSupport.ImportResponseWrapper

java.lang.Object
jakarta.servlet.ServletResponseWrapper
jakarta.servlet.http.HttpServletResponseWrapper
org.apache.velocity.tools.view.ViewImportSupport.ImportResponseWrapper
所有已实现的接口:
jakarta.servlet.http.HttpServletResponse, jakarta.servlet.ServletResponse
封闭类:
ViewImportSupport

protected static class ViewImportSupport.ImportResponseWrapper extends jakarta.servlet.http.HttpServletResponseWrapper
Wraps responses to allow us to retrieve results as Strings.
  • 字段概要

    从接口继承的字段 jakarta.servlet.http.HttpServletResponse

    SC_ACCEPTED, SC_BAD_GATEWAY, SC_BAD_REQUEST, SC_CONFLICT, SC_CONTINUE, SC_CREATED, SC_EXPECTATION_FAILED, SC_FORBIDDEN, SC_FOUND, SC_GATEWAY_TIMEOUT, SC_GONE, SC_HTTP_VERSION_NOT_SUPPORTED, SC_INTERNAL_SERVER_ERROR, SC_LENGTH_REQUIRED, SC_METHOD_NOT_ALLOWED, SC_MOVED_PERMANENTLY, SC_MOVED_TEMPORARILY, SC_MULTIPLE_CHOICES, SC_NO_CONTENT, SC_NON_AUTHORITATIVE_INFORMATION, SC_NOT_ACCEPTABLE, SC_NOT_FOUND, SC_NOT_IMPLEMENTED, SC_NOT_MODIFIED, SC_OK, SC_PARTIAL_CONTENT, SC_PAYMENT_REQUIRED, SC_PRECONDITION_FAILED, SC_PROXY_AUTHENTICATION_REQUIRED, SC_REQUEST_ENTITY_TOO_LARGE, SC_REQUEST_TIMEOUT, SC_REQUEST_URI_TOO_LONG, SC_REQUESTED_RANGE_NOT_SATISFIABLE, SC_RESET_CONTENT, SC_SEE_OTHER, SC_SERVICE_UNAVAILABLE, SC_SWITCHING_PROTOCOLS, SC_TEMPORARY_REDIRECT, SC_UNAUTHORIZED, SC_UNSUPPORTED_MEDIA_TYPE, SC_USE_PROXY
  • 构造器概要

    构造器
    构造器
    说明
    ImportResponseWrapper(jakarta.servlet.http.HttpServletResponse response)
    Constructs a new ImportResponseWrapper.
  • 方法概要

    修饰符和类型
    方法
    说明
    jakarta.servlet.ServletOutputStream
     
    int
     
    Retrieves the buffered output, using the containing tag's 'charEncoding' attribute, or the tag's default encoding, if necessary.
     
    void
    Has no effect.
    void
    Has no effect.
    void
    setStatus(int status)
    Sets the status of the response

    从类继承的方法 jakarta.servlet.http.HttpServletResponseWrapper

    addCookie, addDateHeader, addHeader, addIntHeader, containsHeader, encodeRedirectURL, encodeURL, getHeader, getHeaderNames, getHeaders, getTrailerFields, sendError, sendError, sendRedirect, setDateHeader, setHeader, setIntHeader, setTrailerFields

    从类继承的方法 jakarta.servlet.ServletResponseWrapper

    flushBuffer, getBufferSize, getCharacterEncoding, getContentType, getLocale, getResponse, isCommitted, isWrapperFor, isWrapperFor, reset, resetBuffer, setBufferSize, setCharacterEncoding, setContentLength, setContentLengthLong, setResponse

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    从接口继承的方法 jakarta.servlet.ServletResponse

    flushBuffer, getBufferSize, getCharacterEncoding, getContentType, getLocale, isCommitted, reset, resetBuffer, setBufferSize, setCharacterEncoding, setContentLength, setContentLengthLong
  • 构造器详细资料

    • ImportResponseWrapper

      public ImportResponseWrapper(jakarta.servlet.http.HttpServletResponse response)
      Constructs a new ImportResponseWrapper.
      参数:
      response - the response to wrap
  • 方法详细资料

    • getWriter

      public PrintWriter getWriter()
      指定者:
      getWriter 在接口中 jakarta.servlet.ServletResponse
      覆盖:
      getWriter 在类中 jakarta.servlet.ServletResponseWrapper
      返回:
      a Writer designed to buffer the output.
    • getOutputStream

      public jakarta.servlet.ServletOutputStream getOutputStream()
      指定者:
      getOutputStream 在接口中 jakarta.servlet.ServletResponse
      覆盖:
      getOutputStream 在类中 jakarta.servlet.ServletResponseWrapper
      返回:
      a ServletOutputStream designed to buffer the output.
    • setContentType

      public void setContentType(String x)
      Has no effect.
      指定者:
      setContentType 在接口中 jakarta.servlet.ServletResponse
      覆盖:
      setContentType 在类中 jakarta.servlet.ServletResponseWrapper
      参数:
      x - ignored
    • setLocale

      public void setLocale(Locale x)
      Has no effect.
      指定者:
      setLocale 在接口中 jakarta.servlet.ServletResponse
      覆盖:
      setLocale 在类中 jakarta.servlet.ServletResponseWrapper
      参数:
      x - ignored
    • setStatus

      public void setStatus(int status)
      Sets the status of the response
      指定者:
      setStatus 在接口中 jakarta.servlet.http.HttpServletResponse
      覆盖:
      setStatus 在类中 jakarta.servlet.http.HttpServletResponseWrapper
      参数:
      status - the status code
    • getStatus

      public int getStatus()
      指定者:
      getStatus 在接口中 jakarta.servlet.http.HttpServletResponse
      覆盖:
      getStatus 在类中 jakarta.servlet.http.HttpServletResponseWrapper
      返回:
      the status of the response
    • getString

      public String getString() throws UnsupportedEncodingException
      Retrieves the buffered output, using the containing tag's 'charEncoding' attribute, or the tag's default encoding, if necessary.
      返回:
      the buffered output
      抛出:
      UnsupportedEncodingException - if the encoding is not supported