Package org.apache.tomcat.util.net

# Interface ApplicationBufferHandler

All Known Implementing Classes:
  `BufferedInputFilter`, `ChunkedInputFilter`, `Http11InputBuffer`, `IdentityInputFilter`, `InputBuffer`, `UpgradeApplicationBufferHandler`

public interface ApplicationBufferHandler
Callback interface to be able to expand buffers when buffer overflow exceptions happen or to replace buffers

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final ApplicationBufferHandler`
  `EMPTY`
  `static final ByteBuffer`
  `EMPTY_BUFFER`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `expand(int size)`
  Expand the byte buffer to at least the given size.
  `ByteBuffer`
  `getByteBuffer()`
  `void`
  `setByteBuffer(ByteBuffer buffer)`
  Set the byte buffer.

- ## Field Details

  - ### EMPTY_BUFFER

    static final ByteBuffer EMPTY_BUFFER

  - ### EMPTY

    static final ApplicationBufferHandler EMPTY

- ## Method Details

  - ### setByteBuffer

    void setByteBuffer(ByteBuffer buffer)
    Set the byte buffer.
    Parameters:
      `buffer` - the byte buffer

  - ### getByteBuffer

    ByteBuffer getByteBuffer()
    Returns:
      the byte buffer

  - ### expand

    void expand(int size)
    Expand the byte buffer to at least the given size. Some implementations may not implement this.
    Parameters:
      `size` - the desired size