## org.mortbay.servlet
Class GzipFilter.GzipStream

    java.lang.Object
      java.io.OutputStream
          javax.servlet.ServletOutputStream
              org.mortbay.servlet.GzipFilter.GzipStream

All Implemented Interfaces:
  Closeable, Flushable

Direct Known Subclasses:
  IncludableGzipFilter.IncludableGzipStream

Enclosing class:
  GzipFilter

    public static class GzipFilter.GzipStream

extends ServletOutputStream

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
`GzipFilter.GzipStream(HttpServletRequest request, HttpServletResponse response, long contentLength, int bufferSize, int minGzipSize)`

Method Summary
`void` `close()`
`void` `doGzip()`
`void` `doNotGzip()`
`void` `finish()`
`void` `flush()`
`void` `resetBuffer()`
`protected boolean` `setContentEncodingGzip()`
`void` `setContentLength(long 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

### _request

    protected HttpServletRequest _request

### _response

    protected HttpServletResponse _response

### _out

    protected OutputStream _out

### _bOut

    protected ByteArrayOutputStream2 _bOut

### _gzOut

    protected GZIPOutputStream _gzOut

### _closed

    protected boolean _closed

### _bufferSize

    protected int _bufferSize

### _minGzipSize

    protected int _minGzipSize

### _contentLength

    protected long _contentLength

Constructor Detail

### GzipFilter.GzipStream

    public GzipFilter.GzipStream(HttpServletRequest request,
                                 HttpServletResponse response,
                                 long contentLength,
                                 int bufferSize,
                                 int minGzipSize)
                          throws IOException

Throws:
  `IOException`

Method Detail

### resetBuffer

    public void resetBuffer()

### setContentLength

    public void setContentLength(long length)

### flush

    public void flush()
               throws IOException

  Specified by:
    `flush` in interface `Flushable`
  Overrides:
    `flush` in class `OutputStream`
  Throws:
    `IOException`

### close

    public void close()
               throws IOException

  Specified by:
    `close` in interface `Closeable`
  Overrides:
    `close` in class `OutputStream`
  Throws:
    `IOException`

### finish

    public void finish()
                throws IOException

  Throws:
    `IOException`

### write

    public void write(int b)
               throws IOException

  Specified by:
    `write` in class `OutputStream`
  Throws:
    `IOException`

### write

    public void write(byte[] b)
               throws IOException

  Overrides:
    `write` in class `OutputStream`
  Throws:
    `IOException`

### write

    public void write(byte[] b,
                      int off,
                      int len)
               throws IOException

  Overrides:
    `write` in class `OutputStream`
  Throws:
    `IOException`

### setContentEncodingGzip

    protected boolean setContentEncodingGzip()

### doGzip

    public void doGzip()
                throws IOException

  Throws:
    `IOException`

### doNotGzip

    public void doNotGzip()
                   throws IOException

  Throws:
    `IOException`

Copyright © 2007 Mort Bay Consulting. All Rights Reserved.