# Class ChunkExtension

java.lang.Object
org.apache.tomcat.util.http.parser.ChunkExtension

public class ChunkExtension extends Object
Unlike other HTTP parsers, this is a stateless (state is held by the calling code), streaming parser as chunk headers are read as part of the request body and it is not always possible to buffer then entire chunk header in memory.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static enum`
  `ChunkExtension.State`
  Parsing states for chunk extension.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static ChunkExtension.State`
  `parse(byte b, ChunkExtension.State state)`
  Parses the next byte of a chunk extension.

  ### Methods inherited from class Object

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

- ## Method Details

  - ### parse

    public static ChunkExtension.State parse(byte b, ChunkExtension.State state) throws IOException
    Parses the next byte of a chunk extension.
    Parameters:
      `b` - the byte to parse
      `state` - the current parsing state
    Returns:
      the next parsing state
    Throws:
      `IOException` - if the byte is invalid for the current state