OutputFilter (Apache Tomcat 10.1.48 API Documentation)
Description: declaration: package: org.apache.coyote.http11, interface: OutputFilter

# Interface OutputFilter

All Superinterfaces:
  `HttpOutputBuffer, OutputBuffer`

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

public interface OutputFilter extends HttpOutputBuffer
Output filter.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `recycle()`
  Make the filter ready to process the next request.
  `void`
  `setBuffer(HttpOutputBuffer buffer)`
  Set the next buffer in the filter pipeline.
  `void`
  `setResponse(Response response)`
  Some filters need additional parameters from the response.

  ### Methods inherited from interface HttpOutputBuffer

  `end, flush`

  ### Methods inherited from interface OutputBuffer

  `doWrite, getBytesWritten`

- ## Method Details

  - ### 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.
    Parameters:
      `response` - The response to associate with this OutputFilter

  - ### recycle

    void recycle()
    Make the filter ready to process the next request.

  - ### setBuffer

    void setBuffer(HttpOutputBuffer buffer)
    Set the next buffer in the filter pipeline.
    Parameters:
      `buffer` - The next buffer instance