|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.OutputStream javax.servlet.ServletOutputStream org.eclipse.jetty.http.gzip.GzipStream
public class GzipStream
Field Summary | |
---|---|
protected ByteArrayOutputStream2 |
_bOut
|
protected int |
_bufferSize
|
protected boolean |
_closed
|
protected long |
_contentLength
|
protected GZIPOutputStream |
_gzOut
|
protected int |
_minGzipSize
|
protected OutputStream |
_out
|
protected HttpServletRequest |
_request
|
protected HttpServletResponse |
_response
|
Constructor Summary | |
---|---|
GzipStream(HttpServletRequest request,
HttpServletResponse response,
long contentLength,
int bufferSize,
int minGzipSize)
Instantiates a new gzip stream. |
Method Summary | |
---|---|
void |
close()
|
void |
doGzip()
Do gzip. |
void |
doNotGzip()
Do not gzip. |
void |
finish()
Finish. |
void |
flush()
|
protected PrintWriter |
newWriter(OutputStream out,
String encoding)
Allows derived implementations to replace PrintWriter implementation. |
void |
resetBuffer()
Reset buffer. |
protected boolean |
setContentEncodingGzip()
Sets the content encoding gzip. |
void |
setContentLength(long length)
Sets the content length. |
void |
write(byte[] b)
|
void |
write(byte[] b,
int off,
int len)
|
void |
write(int b)
|
Methods inherited from class javax.servlet.ServletOutputStream |
---|
print, print, print, print, print, print, print, println, println, println, println, println, println, println, println |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected HttpServletRequest _request
protected HttpServletResponse _response
protected OutputStream _out
protected ByteArrayOutputStream2 _bOut
protected GZIPOutputStream _gzOut
protected boolean _closed
protected int _bufferSize
protected int _minGzipSize
protected long _contentLength
Constructor Detail |
---|
public GzipStream(HttpServletRequest request, HttpServletResponse response, long contentLength, int bufferSize, int minGzipSize) throws IOException
request
- the requestresponse
- the responsecontentLength
- the content lengthbufferSize
- the buffer sizeminGzipSize
- the min gzip size
IOException
- Signals that an I/O exception has occurred.Method Detail |
---|
public void resetBuffer()
public void setContentLength(long length)
length
- the new content lengthpublic void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
OutputStream.flush()
public void close() throws IOException
close
in interface Closeable
close
in class OutputStream
IOException
OutputStream.close()
public void finish() throws IOException
IOException
- Signals that an I/O exception has occurred.public void write(int b) throws IOException
write
in class OutputStream
IOException
OutputStream.write(int)
public void write(byte[] b) throws IOException
write
in class OutputStream
IOException
OutputStream.write(byte[])
public void write(byte[] b, int off, int len) throws IOException
write
in class OutputStream
IOException
OutputStream.write(byte[], int, int)
protected boolean setContentEncodingGzip()
public void doGzip() throws IOException
IOException
- Signals that an I/O exception has occurred.public void doNotGzip() throws IOException
IOException
- Signals that an I/O exception has occurred.protected PrintWriter newWriter(OutputStream out, String encoding) throws UnsupportedEncodingException
UnsupportedEncodingException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |