Serializable, Comparable<ContentEncoding>, org.refcodes.mixin.NameAccessorpublic enum ContentEncoding extends Enum<ContentEncoding> implements org.refcodes.mixin.NameAccessor
ContentEncodings are specified an an HTTP Header-Fields
HeaderField.ACCEPT_ENCODING or HeaderField.CONTENT_ENCODING
and how to encode a HTTP body or how a HTTP body is encoded.| Modifier and Type | Method | Description |
|---|---|---|
static ContentEncoding |
fromHttpEncoding(String aHttpEncoding) |
Returns that
ContentEncoding represented by the given HTTP
header's encoding. |
String |
getName() |
Gets the name.
|
static ContentEncoding |
valueOf(String name) |
Returns the enum constant of this type with the specified name.
|
static ContentEncoding[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ContentEncoding GZIP
public static final ContentEncoding COMPRESS
public static final ContentEncoding DEFLATE
public static final ContentEncoding IDENTITY
public static final ContentEncoding BR
public static ContentEncoding[] values()
for (ContentEncoding c : ContentEncoding.values()) System.out.println(c);
public static ContentEncoding valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic String getName()
getName in interface org.refcodes.mixin.NameAccessorpublic static ContentEncoding fromHttpEncoding(String aHttpEncoding)
ContentEncoding represented by the given HTTP
header's encoding.aHttpEncoding - The HTTP header encoding for which to determine the
ContentEncoding.ContentEncoding or null if none was
determinable.Copyright © 2018. All rights reserved.