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