Class AcceptRanges

All Implemented Interfaces:
Serializable, Cloneable, Header, NameValuePair

@Header("Accept-Ranges") public class AcceptRanges extends BasicStringHeader
Represents a parsed Accept-Range HTTP response header.

What partial content range types this server supports via byte serving.

Example

Accept-Ranges: bytes

RFC2616 Specification
The Accept-Ranges response-header field allows the server to indicate its acceptance of range requests for a resource:

Accept-Ranges = "Accept-Ranges" ":" acceptable-ranges acceptable-ranges = 1#range-unit | "none"

Origin servers that accept byte-range requests MAY send...

Accept-Ranges: bytes

...but are not required to do so.

Clients MAY generate byte-range requests without having received this header for the resource involved.

Range units are defined in section 3.12.

Servers that do not accept any kind of range request for a resource MAY send...

Accept-Ranges: none

...to advise the client not to attempt a range request.

See Also:
  • Constructor Details

  • Method Details

    • of

      public static AcceptRanges 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 AcceptRanges 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.