类 GenericResponseWrapper

java.lang.Object
jakarta.servlet.ServletResponseWrapper
jakarta.servlet.http.HttpServletResponseWrapper
com.sh.javax.compress.GenericResponseWrapper
所有已实现的接口:
jakarta.servlet.http.HttpServletResponse, jakarta.servlet.ServletResponse

public class GenericResponseWrapper extends jakarta.servlet.http.HttpServletResponseWrapper

Description:

Title:首亨软件 - TSS/CRM等

从以下版本开始:
Aug 23, 2013
  • 字段概要

    从接口继承的字段 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
  • 构造器概要

    构造器
    构造器
    说明
    GenericResponseWrapper(jakarta.servlet.http.HttpServletResponse response)
    Wrap a normal servlet response so that we can transform the data before it gets sent to the underlying stream
  • 方法概要

    修饰符和类型
    方法
    说明
    void
     
    int
    Get the content length
    Get the content type
    byte[]
    Get the data from the temporary storage stream
    jakarta.servlet.ServletOutputStream
    Get the output stream for this response
    Get a Writer version of the OutputStream
    void
     
    void
    Set the content length for this data
    void
    Set the content type

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

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

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

    getBufferSize, getCharacterEncoding, getLocale, getResponse, isCommitted, isWrapperFor, isWrapperFor, resetBuffer, setBufferSize, setCharacterEncoding, setContentLengthLong, setLocale, setResponse

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

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

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

    getBufferSize, getCharacterEncoding, getLocale, isCommitted, resetBuffer, setBufferSize, setCharacterEncoding, setContentLengthLong, setLocale
  • 构造器详细资料

    • GenericResponseWrapper

      public GenericResponseWrapper(jakarta.servlet.http.HttpServletResponse response) throws IOException
      Wrap a normal servlet response so that we can transform the data before it gets sent to the underlying stream
      参数:
      response - the normal servlet response to wrap
      抛出:
      IOException - IOException
  • 方法详细资料

    • getData

      public byte[] getData()
      Get the data from the temporary storage stream
      返回:
      byte[] with the data in it
    • getOutputStream

      public jakarta.servlet.ServletOutputStream getOutputStream()
      Get the output stream for this response
      指定者:
      getOutputStream 在接口中 jakarta.servlet.ServletResponse
      覆盖:
      getOutputStream 在类中 jakarta.servlet.ServletResponseWrapper
      返回:
      a FilterServletOutputStream wrapping the temporary data
    • setContentLength

      public void setContentLength(int val)
      Set the content length for this data
      指定者:
      setContentLength 在接口中 jakarta.servlet.ServletResponse
      覆盖:
      setContentLength 在类中 jakarta.servlet.ServletResponseWrapper
      参数:
      val - the length to set
    • getContentLength

      public int getContentLength()
      Get the content length
      返回:
      int representing the current content length
    • setContentType

      public void setContentType(String type)
      Set the content type
      指定者:
      setContentType 在接口中 jakarta.servlet.ServletResponse
      覆盖:
      setContentType 在类中 jakarta.servlet.ServletResponseWrapper
      参数:
      type - the content type to set
    • getContentType

      public String getContentType()
      Get the content type
      指定者:
      getContentType 在接口中 jakarta.servlet.ServletResponse
      覆盖:
      getContentType 在类中 jakarta.servlet.ServletResponseWrapper
      返回:
      String with the content type
    • flushBuffer

      public void flushBuffer() throws IOException
      指定者:
      flushBuffer 在接口中 jakarta.servlet.ServletResponse
      覆盖:
      flushBuffer 在类中 jakarta.servlet.ServletResponseWrapper
      抛出:
      IOException
    • reset

      public void reset()
      指定者:
      reset 在接口中 jakarta.servlet.ServletResponse
      覆盖:
      reset 在类中 jakarta.servlet.ServletResponseWrapper
    • getWriter

      public PrintWriter getWriter()
      Get a Writer version of the OutputStream
      指定者:
      getWriter 在接口中 jakarta.servlet.ServletResponse
      覆盖:
      getWriter 在类中 jakarta.servlet.ServletResponseWrapper
      返回:
      PrintWriter wrapping a FilterServletOutputStream