HttpHeaderParser.HeaderParsePosition (Apache Tomcat 10.1.48 API Documentation)
Description: declaration: package: org.apache.tomcat.util.http.parser, class: HttpHeaderParser, enum: HeaderParsePosition

# Enum HttpHeaderParser.HeaderParsePosition

java.lang.Object
java.lang.Enum<HttpHeaderParser.HeaderParsePosition>
org.apache.tomcat.util.http.parser.HttpHeaderParser.HeaderParsePosition

All Implemented Interfaces:
  `Serializable, Comparable<HttpHeaderParser.HeaderParsePosition>, java.lang.constant.Constable`

Enclosing class:
  `HttpHeaderParser`

public static enum HttpHeaderParser.HeaderParsePosition extends Enum<HttpHeaderParser.HeaderParsePosition>

- ## Nested Class Summary

  ### Nested classes/interfaces inherited from class Enum

  `Enum.EnumDesc<E>`

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `HEADER_MULTI_LINE`
  Before reading a new line of a header.
  `HEADER_NAME`
  Reading a header name.
  `HEADER_SKIPLINE`
  Reading all bytes until the next CRLF.
  `HEADER_START`
  Start of a new header.
  `HEADER_VALUE`
  Reading the header value.
  `HEADER_VALUE_START`
  Skipping whitespace before text of header value starts, either on the first line of header value (just after ':') or on subsequent lines when it is known that subsequent line starts with SP or HT.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static HttpHeaderParser.HeaderParsePosition`
  `valueOf(String name)`
  Returns the enum constant of this type with the specified name.
  `static HttpHeaderParser.HeaderParsePosition[]`
  `values()`
  Returns an array containing the constants of this enum type, in the order they are declared.

  ### Methods inherited from class Enum

  `clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

  ### Methods inherited from class Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### HEADER_START

    public static final HttpHeaderParser.HeaderParsePosition HEADER_START
    Start of a new header. A CRLF here means that there are no more headers. Any other character starts a header name.

  - ### HEADER_NAME

    public static final HttpHeaderParser.HeaderParsePosition HEADER_NAME
    Reading a header name. All characters of header are HTTP_TOKEN_CHAR. Header name is followed by ':'. No whitespace is allowed.
    Any non-HTTP_TOKEN_CHAR (this includes any whitespace) encountered before ':' will result in the whole line being ignored.

  - ### HEADER_VALUE_START

    public static final HttpHeaderParser.HeaderParsePosition HEADER_VALUE_START
    Skipping whitespace before text of header value starts, either on the first line of header value (just after ':') or on subsequent lines when it is known that subsequent line starts with SP or HT.

  - ### HEADER_VALUE

    public static final HttpHeaderParser.HeaderParsePosition HEADER_VALUE
    Reading the header value. We are inside the value. Either on the first line or on any subsequent line. We come into this state from HEADER_VALUE_START after the first non-SP/non-HT byte is encountered on the line.

  - ### HEADER_MULTI_LINE

    public static final HttpHeaderParser.HeaderParsePosition HEADER_MULTI_LINE
    Before reading a new line of a header. Once the next byte is peeked, the state changes without advancing our position. The state becomes either HEADER_VALUE_START (if that first byte is SP or HT), or HEADER_START (otherwise).

  - ### HEADER_SKIPLINE

    public static final HttpHeaderParser.HeaderParsePosition HEADER_SKIPLINE
    Reading all bytes until the next CRLF. The line is being ignored.

- ## Method Details

  - ### values

    public static HttpHeaderParser.HeaderParsePosition[] values()
    Returns an array containing the constants of this enum type, in the order they are declared.
    Returns:
      an array containing the constants of this enum type, in the order they are declared

  - ### valueOf

    public static HttpHeaderParser.HeaderParsePosition valueOf(String name)
    Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
    Parameters:
      `name` - the name of the enum constant to be returned.
    Returns:
      the enum constant with the specified name
    Throws:
      `IllegalArgumentException` - if this enum type has no constant with the specified name
      `NullPointerException` - if the argument is null