Enum Class QueryFormat
- All Implemented Interfaces:
Serializable, Comparable<QueryFormat>, Constable
Strategies for encoding/decoding query strings:
Content-Type: application/x-www-form-urlencoded (supports "+" for spaces) or "strict" RFC 3986 (percent-decoding only).- Author:
- Mark Allen
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionFollow RFC 3986, where keys and values are percent-encoded and"+"values are never decoded as spaces.Follow RFC 1866 (theapplication/x-www-form-urlencodedcontent type), where keys and values are percent-encoded but prefer"+"for spaces. -
Method Summary
Modifier and TypeMethodDescriptionstatic QueryFormatReturns the enum constant of this class with the specified name.static QueryFormat[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
X_WWW_FORM_URLENCODED
Follow RFC 1866 (theapplication/x-www-form-urlencodedcontent type), where keys and values are percent-encoded but prefer"+"for spaces.Note that
"%20"values are still decoded as spaces, but any"+"values are decoded as spaces first. -
RFC_3986_STRICT
Follow RFC 3986, where keys and values are percent-encoded and"+"values are never decoded as spaces.
-
-
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
-