Class AcceptRanges
- All Implemented Interfaces:
Serializable,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
ConstructorsConstructorDescriptionAcceptRanges(String value) Constructor.AcceptRanges(Supplier<String> value) Constructor with delayed value. -
Method Summary
Modifier and TypeMethodDescriptionstatic AcceptRangesStatic creator.static AcceptRangesStatic creator with delayed value.Methods inherited from class org.apache.juneau.http.classic.header.BasicStringHeader
assertString, asString, getValue, of, of, ofPair, orElseMethods inherited from class org.apache.juneau.http.classic.header.BasicHeader
assertName, assertStringValue, copy, equals, equalsIgnoreCase, get, getElements, getName, hashCode, isNotEmpty, isPresent, of, of, toString
-
Constructor Details
-
AcceptRanges
Constructor.- Parameters:
value- The header value.
Can benull to create a header with no value.
-
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 to create a header with no value.
-
-
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 .
-