Class AcceptRanges
- All Implemented Interfaces:
Serializable
,Cloneable
,Header
,NameValuePair
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 Summary
ConstructorDescriptionAcceptRanges
(String value) Constructor.AcceptRanges
(Supplier<String> value) Constructor with delayed value. -
Method Summary
Modifier and TypeMethodDescriptionstatic AcceptRanges
Static creator.static AcceptRanges
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
-
AcceptRanges
Constructor.- Parameters:
value
- The header value.
Can benull .
-
AcceptRanges
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 .
-