Class StringRanges
 The returned ranges are sorted such that the most acceptable value is available at ordinal position
 
RFC2616 Specification
The Accept-Encoding request-header field is similar to Accept, but restricts the content-codings (section 3.5) that are acceptable in the response.Accept-Encoding = "Accept-Encoding" ":" 1#( codings [ ";" "q" "=" qvalue ] ) codings = ( content-coding | "*" )
Examples of its use are:
Accept-Encoding: compress, gzip Accept-Encoding: Accept-Encoding: * Accept-Encoding: compress;q=0.5, gzip;q=1.0 Accept-Encoding: gzip;q=1.0, identity; q=0.5, *;q=0
See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringRangesRepresents an empty string ranges object.
- 
Constructor SummaryConstructorsConstructorDescriptionStringRanges(String value) Constructor.StringRanges(HeaderElement... e) Constructor.StringRanges(StringRange... value) Constructor.
- 
Method SummaryModifier and TypeMethodDescriptionforEachRange(Consumer<StringRange> action) Performs an action on the string ranges that make up this object.getRange(int index) Returns theMediaRangeat the specified index.intGiven a list of media types, returns the best match for this string range header.static StringRangesReturns a parsed string range header value.static StringRangesof(StringRange... value) Returns a parsed string range header value.toList()Returns the string ranges that make up this object.toString()
- 
Field Details- 
EMPTYRepresents an empty string ranges object.
 
- 
- 
Constructor Details- 
StringRangesConstructor.- Parameters:
- value- The string range header value.
 
- 
StringRangesConstructor.- Parameters:
- value- The string range header value.
 
- 
StringRangesConstructor.- Parameters:
- e- The parsed string range header value.
 
 
- 
- 
Method Details- 
ofReturns a parsed string range header value.- Parameters:
- value- The raw header value.
- Returns:
- A parsed header value.
 
- 
ofReturns a parsed string range header value.- Parameters:
- value- The raw header value.
- Returns:
- A parsed header value.
 
- 
matchGiven a list of media types, returns the best match for this string range header.Note that fuzzy matching is allowed on the media types where the string range header may contain additional subtype parts. 
 For example, given identical q-values and an string range value of"text/json+activity" , the media type"text/json" will match if"text/json+activity" or"text/activity+json" isn't found.
 The purpose for this is to allow serializers to match when artifacts such asid properties are present in the header.- Parameters:
- names- The names to match against.
- Returns:
- The index into the array of the best match, or -1 if no suitable matches could be found.
 
- 
getRangeReturns theMediaRangeat the specified index.- Parameters:
- index- The index position of the media range.
- Returns:
- The MediaRangeat the specified index ornull if the index is out of range.
 
- 
toListReturns the string ranges that make up this object.- Returns:
- The string ranges that make up this object.
 
- 
forEachRangePerforms an action on the string ranges that make up this object.- Parameters:
- action- The action to perform.
- Returns:
- This object.
 
- 
toString
 
-