|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.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 boolean |
_doNotGzip
|
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
protected boolean _doNotGzip
| 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 length
public void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOExceptionOutputStream.flush()
public void close()
throws IOException
close in interface Closeableclose in class OutputStreamIOExceptionOutputStream.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 OutputStreamIOExceptionOutputStream.write(int)
public void write(byte[] b)
throws IOException
write in class OutputStreamIOExceptionOutputStream.write(byte[])
public void write(byte[] b,
int off,
int len)
throws IOException
write in class OutputStreamIOExceptionOutputStream.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 | |||||||||