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.
  • 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