Enum HttpVersion
- All Implemented Interfaces:
Serializable, Comparable<HttpVersion>
Type safe enumeration representing HTTP protocol version
-
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic HttpVersionfromString(String string) Returns theHttpVersioninstance from the specified string.toString()static HttpVersionReturns the enum constant of this type with the specified name.static HttpVersion[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
HTTP_1_1
HTTP 1/1 -
HTTP_1_0
HTTP 1/0
-
-
Field Details
-
value
-
-
Constructor Details
-
HttpVersion
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
fromString
Returns theHttpVersioninstance from the specified string.- Parameters:
string- The String containing the HTTP version- Returns:
- The version, or
nullif no version is found
-
toString
- Overrides:
toStringin classEnum<HttpVersion>- Returns:
- A String representation of this version
-