Class TransferEncoding
- All Implemented Interfaces:
Serializable
,Cloneable
,Header
,NameValuePair
The form of encoding used to safely transfer the entity to the user. Currently defined methods are: chunked, compress, deflate, gzip, identity.
Example
Transfer-Encoding: chunked
RFC2616 Specification
The Transfer-Encoding general-header field indicates what (if any) type of transformation has been applied to the message body in order to safely transfer it between the sender and the recipient. This differs from the content-coding in that the transfer-coding is a property of the message, not of the entity.Transfer-Encoding = "Transfer-Encoding" ":" 1#transfer-coding
Transfer-codings are defined in section 3.6. An example is:
Transfer-Encoding: chunked
If multiple encodings have been applied to an entity, the transfer-codings MUST be listed in the order in which they were applied. Additional information about the encoding parameters MAY be provided by other entity-header fields not defined by this specification.
Many older HTTP/1.0 applications do not understand the Transfer-Encoding header.
See Also:
-
Constructor Summary
ConstructorDescriptionTransferEncoding
(String value) Constructor.TransferEncoding
(Supplier<String> value) Constructor with delayed value. -
Method Summary
Modifier and TypeMethodDescriptionstatic TransferEncoding
Static creator.static TransferEncoding
Static creator with delayed value.Methods inherited from class org.apache.juneau.http.header.BasicStringHeader
assertString, asString, getValue, of, of, ofPair, orElse
Methods inherited from class org.apache.juneau.http.header.BasicHeader
assertName, assertStringValue, equals, equalsIgnoreCase, get, getElements, getName, hashCode, isNotEmpty, isPresent, of, of, toString
-
Constructor Details
-
TransferEncoding
Constructor.- Parameters:
value
- The header value.
Can benull .
-
TransferEncoding
Constructor with delayed value.Header value is re-evaluated on each call to
BasicStringHeader.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .
-
-
Method Details
-
of
Static creator.- Parameters:
value
- The header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-
of
Static creator with delayed value.Header value is re-evaluated on each call to
BasicStringHeader.getValue()
.- Parameters:
value
- The supplier of the header value.
Can benull .- Returns:
- A new header bean, or
null if the value isnull .
-