InputFilter (Tomcat API Documentation)
Keywords: org.apache.coyote.http11.InputFilter interface

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

## org.apache.coyote.http11
Interface InputFilter

All Superinterfaces:
  InputBuffer

All Known Implementing Classes:
  BufferedInputFilter, ChunkedInputFilter, IdentityInputFilter, SavedRequestInputFilter, VoidInputFilter

    public interface InputFilter

extends InputBuffer

Input filter interface.

Author:
  Remy Maucherat

Method Summary
`int` | `available()` Amount of bytes still available in a buffer.
`int` | `doRead(ByteChunk chunk, Request unused)` Read 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(InputBuffer buffer)` Set the next buffer in the filter pipeline.
`void` | `setRequest(Request request)` Some filters need additional parameters from the request.

Method Detail

### doRead

    int doRead(ByteChunk chunk,
               Request unused)
               throws java.io.IOException

  Read bytes.

  Specified by:
    `doRead` in interface `InputBuffer`
  Returns:
    Number of bytes read.
  Throws:
    `java.io.IOException`

### setRequest

    void setRequest(Request request)

  Some filters need additional parameters from the request. All the necessary reading can occur in that method, as this method is called after the request 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(InputBuffer buffer)

  Set the next buffer in the filter pipeline.

### end

    long end()
             throws java.io.IOException

  End the current request.

  Returns:
    0 is the expected return value. A positive value indicates that too many bytes were read. This method is allowed to use buffer.doRead to consume extra bytes. The result of this method can't be negative (if an error happens, an IOException should be thrown instead).
  Throws:
    `java.io.IOException`

### available

    int available()

  Amount of bytes still available in a buffer.

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

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