OutputFilter (Apache Tomcat 6.0.53 API Documentation)
Keywords: org.apache.coyote.http11.OutputFilter interface

Overview | Package | Class | Tree | Deprecated | Index | Help
| Apache Tomcat 6.0.53
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.coyote.http11
Interface OutputFilter

All Superinterfaces:
  OutputBuffer

All Known Implementing Classes:
  ChunkedOutputFilter, GzipOutputFilter, IdentityOutputFilter, VoidOutputFilter

    public interface OutputFilter

extends OutputBuffer

Output filter.

Author:
  Remy Maucherat

Method Summary
`int` | `doWrite(ByteChunk chunk, Response unused)` Write some bytes.
`long` | `end()` End the current request.
`ByteChunk` | `getEncodingName()` Get the name of the encoding handled by this filter.
`void` | `recycle()` Make the filter ready to process the next request.
`void` | `setBuffer(OutputBuffer buffer)` Set the next buffer in the filter pipeline.
`void` | `setResponse(Response response)` Some filters need additional parameters from the response.

Method Detail

### doWrite

    int doWrite(ByteChunk chunk,
                Response unused)
                throws java.io.IOException

  Write some bytes.

  Specified by:
    `doWrite` in interface `OutputBuffer`
  Parameters:
    `chunk` - data to write
    `unused` - used to allow buffers that can be shared by multiple responses.
  Returns:
    number of bytes written by the filter
  Throws:
    `java.io.IOException`

### setResponse

    void setResponse(Response response)

  Some filters need additional parameters from the response. All the necessary reading can occur in that method, as this method is called after the response header processing is complete.

### recycle

    void recycle()

  Make the filter ready to process the next request.

### getEncodingName

    ByteChunk getEncodingName()

  Get the name of the encoding handled by this filter.

### setBuffer

    void setBuffer(OutputBuffer buffer)

  Set the next buffer in the filter pipeline.

### end

    long end()
             throws java.io.IOException

  End the current request. It is acceptable to write extra bytes using buffer.doWrite during the execution of this method.

  Returns:
    Should return 0 unless the filter does some content length delimitation, in which case the number is the amount of extra bytes or missing bytes, which would indicate an error. Note: It is recommended that extra bytes be swallowed by the filter.
  Throws:
    `java.io.IOException`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Apache Tomcat 6.0.53
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.