org.eclipse.jetty.http.gzip
public abstract class AbstractCompressedStream extends javax.servlet.ServletOutputStream
| Modifier and Type | Field and Description |
|---|---|
protected ByteArrayOutputStream2 |
_bOut |
protected boolean |
_closed |
protected java.util.zip.DeflaterOutputStream |
_compressedOutputStream |
protected boolean |
_doNotCompress |
protected java.io.OutputStream |
_out |
protected javax.servlet.http.HttpServletResponse |
_response |
protected java.lang.String |
_vary |
protected CompressedResponseWrapper |
_wrapper |
| Constructor and Description |
|---|
AbstractCompressedStream(java.lang.String encoding,
javax.servlet.http.HttpServletRequest request,
CompressedResponseWrapper wrapper,
java.lang.String vary)
Instantiates a new compressed stream.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addHeader(java.lang.String name,
java.lang.String value) |
void |
close() |
protected abstract java.util.zip.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() |
java.io.OutputStream |
getOutputStream() |
boolean |
isClosed() |
protected java.io.PrintWriter |
newWriter(java.io.OutputStream out,
java.lang.String encoding)
Allows derived implementations to replace PrintWriter implementation.
|
void |
resetBuffer()
Reset buffer.
|
void |
setBufferSize(int bufferSize) |
void |
setContentLength() |
protected void |
setHeader(java.lang.String name,
java.lang.String value) |
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
protected final java.lang.String _vary
protected final CompressedResponseWrapper _wrapper
protected final javax.servlet.http.HttpServletResponse _response
protected java.io.OutputStream _out
protected ByteArrayOutputStream2 _bOut
protected java.util.zip.DeflaterOutputStream _compressedOutputStream
protected boolean _closed
protected boolean _doNotCompress
public AbstractCompressedStream(java.lang.String encoding,
javax.servlet.http.HttpServletRequest request,
CompressedResponseWrapper wrapper,
java.lang.String vary)
throws java.io.IOException
java.io.IOExceptionpublic void resetBuffer()
public void setBufferSize(int bufferSize)
public void setContentLength()
public void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOExceptionOutputStream.flush()public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in class java.io.OutputStreamjava.io.IOExceptionOutputStream.close()public void finish()
throws java.io.IOException
java.io.IOException - Signals that an I/O exception has occurred.public void write(int b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionOutputStream.write(int)public void write(byte[] b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionOutputStream.write(byte[])public void write(byte[] b,
int off,
int len)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionOutputStream.write(byte[], int, int)public void doCompress()
throws java.io.IOException
java.io.IOException - Signals that an I/O exception has occurred.public void doNotCompress(boolean sendVary)
throws java.io.IOException
java.io.IOException - Signals that an I/O exception has occurred.public java.io.OutputStream getOutputStream()
org.eclipse.jetty.http.gzip.CompressedStream#getOutputStream()public boolean isClosed()
org.eclipse.jetty.http.gzip.CompressedStream#isClosed()protected java.io.PrintWriter newWriter(java.io.OutputStream out,
java.lang.String encoding)
throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingExceptionprotected void addHeader(java.lang.String name,
java.lang.String value)
protected void setHeader(java.lang.String name,
java.lang.String value)
protected abstract java.util.zip.DeflaterOutputStream createStream()
throws java.io.IOException
java.io.IOException - Signals that an I/O exception has occurred.Copyright © 2014. All Rights Reserved.