UpgradeApplicationBufferHandler (Apache Tomcat 11.0.22 API Documentation)
Description: declaration: package: org.apache.coyote.http11.upgrade, class: UpgradeApplicationBufferHandler

# Class UpgradeApplicationBufferHandler

java.lang.Object
org.apache.coyote.http11.upgrade.UpgradeApplicationBufferHandler

All Implemented Interfaces:
  `ApplicationBufferHandler`

public class UpgradeApplicationBufferHandler extends Object implements ApplicationBufferHandler
Trivial implementation of `ApplicationBufferHandler` to support saving of HTTP request bodies during an HTTP/1.1 upgrade.

- ## Field Summary

  ### Fields inherited from interface ApplicationBufferHandler

  `EMPTY, EMPTY_BUFFER`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `UpgradeApplicationBufferHandler()`

- ## 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 byteBuffer)`
  Set the byte buffer.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### UpgradeApplicationBufferHandler

    public UpgradeApplicationBufferHandler()

- ## Method Details

  - ### setByteBuffer

    public void setByteBuffer(ByteBuffer byteBuffer)
    Description copied from interface: `ApplicationBufferHandler`
    Set the byte buffer.
    Specified by:
      `setByteBuffer` in interface `ApplicationBufferHandler`
    Parameters:
      `byteBuffer` - the byte buffer

  - ### getByteBuffer

    public ByteBuffer getByteBuffer()
    Specified by:
      `getByteBuffer` in interface `ApplicationBufferHandler`
    Returns:
      the byte buffer

  - ### expand

    public void expand(int size)
    Description copied from interface: `ApplicationBufferHandler`
    Expand the byte buffer to at least the given size. Some implementations may not implement this.
    Specified by:
      `expand` in interface `ApplicationBufferHandler`
    Parameters:
      `size` - the desired size