@Header(name="Content-Encoding", _enum={"gzip","compress","deflate","identity","other"}) public class ContentEncoding extends BasicStringHeader
The type of encoding used on the data.
Content-Encoding: gzip
Content-Encoding = "Content-Encoding" ":" 1#content-coding
Content codings are defined in section 3.5. An example of its use is...
Content-Encoding: gzip
The content-coding is a characteristic of the entity identified by the Request-URI. Typically, the entity-body is stored with this encoding and is only decoded before rendering or analogous usage. However, a non-transparent proxy MAY modify the content-coding if the new coding is known to be acceptable to the recipient, unless the "no-transform" cache-control directive is present in the message.
If the content-coding of an entity is not "identity", then the response MUST include a Content-Encoding entity-header (section 14.11) that lists the non-identity content-coding(s) used.
If the content-coding of an entity in a request message is not acceptable to the origin server, the server SHOULD respond with a status code of 415 (Unsupported Media Type).
If multiple encodings have been applied to an entity, the content codings MUST be listed in the order in which they were applied. Additional information about the encoding parameters MAY be provided.
Constructor and Description |
---|
ContentEncoding(Object value)
Constructor.
|
ContentEncoding(String value)
Constructor
|
Modifier and Type | Method and Description |
---|---|
static ContentEncoding |
of(Object value)
Convenience creator.
|
static ContentEncoding |
of(Supplier<?> value)
Convenience creator using supplier.
|
assertString, getValue, of, of
assertName, assertValue, canCast, cast, eqIC, equals, getElements, getName, getRawValue, hashCode, isSupplier, of, ofPair, toString, unwrap
public ContentEncoding(Object value)
public ContentEncoding(String value)
value
- The header value.public static ContentEncoding of(Object value)
value
- The header value.
String
ContentEncoding
object.public static ContentEncoding of(Supplier<?> value)
Header value is re-evaluated on each call to BasicStringHeader.getValue()
.
value
- The header value supplier.
String
ContentEncoding
object.Copyright © 2016–2020 The Apache Software Foundation. All rights reserved.