|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjavax.servlet.ServletResponseWrapper
javax.servlet.http.HttpServletResponseWrapper
org.eclipse.jetty.http.gzip.CompressedResponseWrapper
public abstract class CompressedResponseWrapper
| 字段摘要 | |
|---|---|
protected HttpServletRequest |
_request
|
static int |
DEFAULT_BUFFER_SIZE
|
static int |
DEFAULT_MIN_COMPRESS_SIZE
|
| 构造方法摘要 | |
|---|---|
CompressedResponseWrapper(HttpServletRequest request,
HttpServletResponse response)
|
|
| 方法摘要 | |
|---|---|
void |
addHeader(String name,
String value)
The default behavior of this method is to return addHeader(String name, String value) on the wrapped response object. |
boolean |
containsHeader(String name)
The default behavior of this method is to call containsHeader(String name) on the wrapped response object. |
void |
finish()
|
void |
flushBuffer()
The default behavior of this method is to call flushBuffer() on the wrapped response object. |
int |
getBufferSize()
The default behavior of this method is to return getBufferSize() on the wrapped response object. |
long |
getContentLength()
|
String |
getETag()
|
int |
getMinCompressSize()
|
ServletOutputStream |
getOutputStream()
The default behavior of this method is to return getOutputStream() on the wrapped response object. |
HttpServletRequest |
getRequest()
|
PrintWriter |
getWriter()
The default behavior of this method is to return getWriter() on the wrapped response object. |
protected abstract AbstractCompressedStream |
newCompressedStream(HttpServletRequest _request,
HttpServletResponse response)
|
protected PrintWriter |
newWriter(OutputStream out,
String encoding)
Allows derived implementations to replace PrintWriter implementation. |
void |
noCompression()
|
void |
reset()
The default behavior of this method is to call reset() on the wrapped response object. |
void |
resetBuffer()
The default behavior of this method is to call resetBuffer() on the wrapped response object. |
void |
sendError(int sc)
The default behavior of this method is to call sendError(int sc) on the wrapped response object. |
void |
sendError(int sc,
String msg)
The default behavior of this method is to call sendError(int sc, String msg) on the wrapped response object. |
void |
sendRedirect(String location)
The default behavior of this method is to return sendRedirect(String location) on the wrapped response object. |
void |
setBufferSize(int bufferSize)
The default behavior of this method is to call setBufferSize(int size) on the wrapped response object. |
void |
setContentLength(int length)
The default behavior of this method is to call setContentLength(int len) on the wrapped response object. |
protected void |
setContentLength(long length)
|
void |
setContentType(String ct)
The default behavior of this method is to call setContentType(String type) on the wrapped response object. |
void |
setHeader(String name,
String value)
The default behavior of this method is to return setHeader(String name, String value) on the wrapped response object. |
void |
setIntHeader(String name,
int value)
The default behavior of this method is to call setIntHeader(String name, int value) on the wrapped response object. |
void |
setMimeTypes(Set<String> mimeTypes)
|
void |
setMinCompressSize(int minCompressSize)
|
void |
setStatus(int sc)
The default behavior of this method is to call setStatus(int sc) on the wrapped response object. |
void |
setStatus(int sc,
String sm)
The default behavior of this method is to call setStatus(int sc, String sm) on the wrapped response object. |
| 从类 javax.servlet.http.HttpServletResponseWrapper 继承的方法 |
|---|
addCookie, addDateHeader, addIntHeader, encodeRedirectUrl, encodeRedirectURL, encodeUrl, encodeURL, getHeader, getHeaderNames, getHeaders, getStatus, setDateHeader |
| 从类 javax.servlet.ServletResponseWrapper 继承的方法 |
|---|
getCharacterEncoding, getContentType, getLocale, getResponse, isCommitted, isWrapperFor, isWrapperFor, setCharacterEncoding, setLocale, setResponse |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 从接口 javax.servlet.ServletResponse 继承的方法 |
|---|
getCharacterEncoding, getContentType, getLocale, isCommitted, setCharacterEncoding, setLocale |
| 字段详细信息 |
|---|
public static final int DEFAULT_BUFFER_SIZE
public static final int DEFAULT_MIN_COMPRESS_SIZE
protected HttpServletRequest _request
| 构造方法详细信息 |
|---|
public CompressedResponseWrapper(HttpServletRequest request,
HttpServletResponse response)
| 方法详细信息 |
|---|
public long getContentLength()
public int getBufferSize()
ServletResponseWrapper 复制的描述
ServletResponse 中的 getBufferSizeServletResponseWrapper 中的 getBufferSizeServletResponse.setBufferSize(int),
ServletResponse.flushBuffer(),
ServletResponse.isCommitted(),
ServletResponse.reset()public int getMinCompressSize()
public String getETag()
public HttpServletRequest getRequest()
public void setMimeTypes(Set<String> mimeTypes)
setMimeTypes(java.util.Set)public void setBufferSize(int bufferSize)
ServletResponseWrapper 复制的描述
ServletResponse 中的 setBufferSizeServletResponseWrapper 中的 setBufferSizebufferSize - the preferred buffer sizesetBufferSize(int)public void setMinCompressSize(int minCompressSize)
setMinCompressSize(int)public void setContentType(String ct)
ServletResponseWrapper 复制的描述
ServletResponse 中的 setContentTypeServletResponseWrapper 中的 setContentTypect - a String specifying the MIME
type of the contentsetContentType(java.lang.String)
public void setStatus(int sc,
String sm)
HttpServletResponseWrapper 复制的描述
HttpServletResponse 中的 setStatusHttpServletResponseWrapper 中的 setStatussc - the status codesm - the status messagesetStatus(int, java.lang.String)public void setStatus(int sc)
HttpServletResponseWrapper 复制的描述
HttpServletResponse 中的 setStatusHttpServletResponseWrapper 中的 setStatussc - the status codesetStatus(int)public void setContentLength(int length)
ServletResponseWrapper 复制的描述
ServletResponse 中的 setContentLengthServletResponseWrapper 中的 setContentLengthlength - an integer specifying the length of the
content being returned to the client; sets
the Content-Length headersetContentLength(int)protected void setContentLength(long length)
public void addHeader(String name,
String value)
HttpServletResponseWrapper 复制的描述
HttpServletResponse 中的 addHeaderHttpServletResponseWrapper 中的 addHeadername - the name of the headervalue - the additional header value If it contains
octet string, it should be encoded
according to RFC 2047
(http://www.ietf.org/rfc/rfc2047.txt)addHeader(java.lang.String, java.lang.String)
public void flushBuffer()
throws IOException
ServletResponseWrapper 复制的描述
ServletResponse 中的 flushBufferServletResponseWrapper 中的 flushBufferIOExceptionflushBuffer()public void reset()
ServletResponseWrapper 复制的描述
ServletResponse 中的 resetServletResponseWrapper 中的 resetreset()public void resetBuffer()
ServletResponseWrapper 复制的描述
ServletResponse 中的 resetBufferServletResponseWrapper 中的 resetBufferresetBuffer()
public void sendError(int sc,
String msg)
throws IOException
HttpServletResponseWrapper 复制的描述
HttpServletResponse 中的 sendErrorHttpServletResponseWrapper 中的 sendErrorsc - the error status codemsg - the descriptive message
IOException - If an input or output exception occurssendError(int, java.lang.String)
public void sendError(int sc)
throws IOException
HttpServletResponseWrapper 复制的描述
HttpServletResponse 中的 sendErrorHttpServletResponseWrapper 中的 sendErrorsc - the error status code
IOException - If an input or output exception occurssendError(int)
public void sendRedirect(String location)
throws IOException
HttpServletResponseWrapper 复制的描述
HttpServletResponse 中的 sendRedirectHttpServletResponseWrapper 中的 sendRedirectlocation - the redirect location URL
IOException - If an input or output exception occurssendRedirect(java.lang.String)public void noCompression()
noCompression()
public void finish()
throws IOException
IOExceptionfinish()
public void setHeader(String name,
String value)
HttpServletResponseWrapper 复制的描述
HttpServletResponse 中的 setHeaderHttpServletResponseWrapper 中的 setHeadername - the name of the headervalue - the header value If it contains octet string,
it should be encoded according to RFC 2047
(http://www.ietf.org/rfc/rfc2047.txt)setHeader(java.lang.String, java.lang.String)public boolean containsHeader(String name)
HttpServletResponseWrapper 复制的描述
HttpServletResponse 中的 containsHeaderHttpServletResponseWrapper 中的 containsHeadername - the header name
true if the named response header
has already been set;
false otherwise
public ServletOutputStream getOutputStream()
throws IOException
ServletResponseWrapper 复制的描述
ServletResponse 中的 getOutputStreamServletResponseWrapper 中的 getOutputStreamServletOutputStream for writing binary data
IOException - if an input or output exception occurredgetOutputStream()
public PrintWriter getWriter()
throws IOException
ServletResponseWrapper 复制的描述
ServletResponse 中的 getWriterServletResponseWrapper 中的 getWriterPrintWriter object that
can return character data to the client
IOException - if an input or output exception occurredgetWriter()
public void setIntHeader(String name,
int value)
HttpServletResponseWrapper 复制的描述
HttpServletResponse 中的 setIntHeaderHttpServletResponseWrapper 中的 setIntHeadername - the name of the headervalue - the assigned integer valuesetIntHeader(java.lang.String, int)
protected PrintWriter newWriter(OutputStream out,
String encoding)
throws UnsupportedEncodingException
out - the outencoding - the encoding
UnsupportedEncodingException - the unsupported encoding exception
protected abstract AbstractCompressedStream newCompressedStream(HttpServletRequest _request,
HttpServletResponse response)
throws IOException
IOException
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||