Enum Class HttpHeaderParser

java.lang.Object
java.lang.Enum<HttpHeaderParser>
org.elasticsearch.test.fixture.HttpHeaderParser
All Implemented Interfaces:
Serializable, Comparable<HttpHeaderParser>, Constable

public enum HttpHeaderParser extends Enum<HttpHeaderParser>
  • Method Details

    • values

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

      public static HttpHeaderParser valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • parseRangeHeader

      public static HttpHeaderParser.Range parseRangeHeader(String rangeHeaderValue)
      Parse a "Range" header Note: only a single bounded range is supported (e.g. Range: bytes={range_start}-{range_end})
      Parameters:
      rangeHeaderValue - The header value as a string
      Returns:
      a HttpHeaderParser.Range instance representing the parsed value, or null if the header is malformed
      See Also:
    • parseContentRangeHeader

      public static HttpHeaderParser.ContentRange parseContentRangeHeader(String contentRangeHeaderValue)
      Parse a "Content-Range" header
      Parameters:
      contentRangeHeaderValue - The header value as a string
      Returns:
      a HttpHeaderParser.ContentRange instance representing the parsed value, or null if the header is malformed
      See Also: