Class TransferEncoding

All Implemented Interfaces:
Serializable, Cloneable, Header, NameValuePair

@Header("Transfer-Encoding") public class TransferEncoding extends BasicStringHeader
Represents a parsed Transfer-Encoding HTTP response header.

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 Details

  • Method Details

    • of

      public static TransferEncoding of(String value)
      Static creator.
      Parameters:
      value - The header value.
      Can be null.
      Returns:
      A new header bean, or null if the value is null.
    • of

      public static TransferEncoding of(Supplier<String> value)
      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 be null.
      Returns:
      A new header bean, or null if the value is null.