|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjava.io.OutputStream
javax.servlet.ServletOutputStream
org.eclipse.jetty.http.gzip.AbstractCompressedStream
public abstract class AbstractCompressedStream
Skeletal implementation of a CompressedStream. This class adds compression features to a ServletOutputStream and takes care of setting response headers, etc. Major work and configuration is done here. Subclasses using different kinds of compression only have to implement the abstract methods doCompress() and setContentEncoding() using the desired compression and setting the appropriate Content-Encoding header string.
| 字段摘要 | |
|---|---|
protected ByteArrayOutputStream2 |
_bOut
|
protected boolean |
_closed
|
protected DeflaterOutputStream |
_compressedOutputStream
|
protected boolean |
_doNotCompress
|
protected OutputStream |
_out
|
protected HttpServletResponse |
_response
|
protected String |
_vary
|
protected CompressedResponseWrapper |
_wrapper
|
| 构造方法摘要 | |
|---|---|
AbstractCompressedStream(String encoding,
HttpServletRequest request,
CompressedResponseWrapper wrapper,
String vary)
Instantiates a new compressed stream. |
|
| 方法摘要 | |
|---|---|
protected void |
addHeader(String name,
String value)
|
void |
close()
|
protected abstract DeflaterOutputStream |
createStream()
Create the stream fitting to the underlying compression type. |
void |
doCompress()
Do compress. |
void |
doNotCompress(boolean sendVary)
Do not compress. |
void |
finish()
Finish. |
void |
flush()
|
OutputStream |
getOutputStream()
|
boolean |
isClosed()
|
protected PrintWriter |
newWriter(OutputStream out,
String encoding)
Allows derived implementations to replace PrintWriter implementation. |
void |
resetBuffer()
Reset buffer. |
void |
setBufferSize(int bufferSize)
|
void |
setContentLength()
|
protected void |
setHeader(String name,
String value)
|
void |
write(byte[] b)
|
void |
write(byte[] b,
int off,
int len)
|
void |
write(int b)
|
| 从类 javax.servlet.ServletOutputStream 继承的方法 |
|---|
print, print, print, print, print, print, print, println, println, println, println, println, println, println, println |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 字段详细信息 |
|---|
protected final String _vary
protected final CompressedResponseWrapper _wrapper
protected final HttpServletResponse _response
protected OutputStream _out
protected ByteArrayOutputStream2 _bOut
protected DeflaterOutputStream _compressedOutputStream
protected boolean _closed
protected boolean _doNotCompress
| 构造方法详细信息 |
|---|
public AbstractCompressedStream(String encoding,
HttpServletRequest request,
CompressedResponseWrapper wrapper,
String vary)
throws IOException
IOException| 方法详细信息 |
|---|
public void resetBuffer()
public void setBufferSize(int bufferSize)
public void setContentLength()
public void flush()
throws IOException
Flushable 中的 flushOutputStream 中的 flushIOExceptionOutputStream.flush()
public void close()
throws IOException
Closeable 中的 closeOutputStream 中的 closeIOExceptionOutputStream.close()
public void finish()
throws IOException
IOException - Signals that an I/O exception has occurred.
public void write(int b)
throws IOException
OutputStream 中的 writeIOExceptionOutputStream.write(int)
public void write(byte[] b)
throws IOException
OutputStream 中的 writeIOExceptionOutputStream.write(byte[])
public void write(byte[] b,
int off,
int len)
throws IOException
OutputStream 中的 writeIOExceptionOutputStream.write(byte[], int, int)
public void doCompress()
throws IOException
IOException - Signals that an I/O exception has occurred.
public void doNotCompress(boolean sendVary)
throws IOException
IOException - Signals that an I/O exception has occurred.public OutputStream getOutputStream()
org.eclipse.jetty.http.gzip.CompressedStream#getOutputStream()public boolean isClosed()
org.eclipse.jetty.http.gzip.CompressedStream#isClosed()
protected PrintWriter newWriter(OutputStream out,
String encoding)
throws UnsupportedEncodingException
UnsupportedEncodingException
protected void addHeader(String name,
String value)
protected void setHeader(String name,
String value)
protected abstract DeflaterOutputStream createStream()
throws IOException
IOException - Signals that an I/O exception has occurred.
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||