Package com.landawn.abacus.http
Enum ContentFormat
- java.lang.Object
-
- java.lang.Enum<ContentFormat>
-
- com.landawn.abacus.http.ContentFormat
-
- All Implemented Interfaces:
Serializable
,Comparable<ContentFormat>
public enum ContentFormat extends Enum<ContentFormat>
- Author:
- haiyangl
-
-
Enum Constant Summary
Enum Constants Enum Constant Description FormUrlEncoded
GZIP
JSON
JSON_GZIP
JSON_LZ4
JSON_SNAPPY
KRYO
LZ4
NONE
SNAPPY
XML
XML_GZIP
XML_LZ4
XML_SNAPPY
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
contentEncoding()
String
contentType()
static ContentFormat
valueOf(String name)
Returns the enum constant of this type with the specified name.static ContentFormat[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NONE
public static final ContentFormat NONE
-
JSON
public static final ContentFormat JSON
-
JSON_LZ4
public static final ContentFormat JSON_LZ4
-
JSON_SNAPPY
public static final ContentFormat JSON_SNAPPY
-
JSON_GZIP
public static final ContentFormat JSON_GZIP
-
XML
public static final ContentFormat XML
-
XML_LZ4
public static final ContentFormat XML_LZ4
-
XML_SNAPPY
public static final ContentFormat XML_SNAPPY
-
XML_GZIP
public static final ContentFormat XML_GZIP
-
FormUrlEncoded
public static final ContentFormat FormUrlEncoded
-
KRYO
public static final ContentFormat KRYO
-
LZ4
public static final ContentFormat LZ4
-
SNAPPY
public static final ContentFormat SNAPPY
-
GZIP
public static final ContentFormat GZIP
-
-
Method Detail
-
values
public static ContentFormat[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ContentFormat c : ContentFormat.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ContentFormat 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 nameNullPointerException
- if the argument is null
-
contentType
public String contentType()
-
contentEncoding
public String contentEncoding()
-
-