Package org.elasticsearch.test.fixture
Enum Class HttpHeaderParser
- All Implemented Interfaces:
Serializable
,Comparable<HttpHeaderParser>
,Constable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
A HTTP "Content Range"static final record
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Method Summary
Modifier and TypeMethodDescriptionparseContentRangeHeader
(String contentRangeHeaderValue) Parse a "Content-Range" headerstatic HttpHeaderParser.Range
parseRangeHeader
(String rangeHeaderValue) Parse a "Range" header Note: only a single bounded range is supported (e.g.static HttpHeaderParser
Returns the enum constant of this class with the specified name.static HttpHeaderParser[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
parseRangeHeader
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
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:
-