Class AcceptCharset
- All Implemented Interfaces:
- Serializable,- Cloneable,- Header,- NameValuePair
Character sets that are acceptable.
Example
Accept-Charset: utf-8
RFC2616 Specification
The Accept-Charset request-header field can be used to indicate what character sets are acceptable for the response.This field allows clients capable of understanding more comprehensive or special- purpose character sets to signal that capability to a server which is capable of representing documents in those character sets.
Accept-Charset = "Accept-Charset" ":" 1#( ( charset | "*" )[ ";" "q" "=" qvalue ] )
Character set values are described in section 3.4. Each charset MAY be given an associated quality value which represents the user's preference for that charset. The default value is q=1. An example is...
Accept-Charset: iso-8859-5, unicode-1-1;q=0.8
The special value "*", if present in the Accept-Charset field, matches every character set (including ISO-8859-1) which is not mentioned elsewhere in the Accept-Charset field.
If no "*" is present in an Accept-Charset field, then all character sets not explicitly mentioned get a quality value of 0, except for ISO-8859-1, which gets a quality value of 1 if not explicitly mentioned.
If no Accept-Charset header is present, the default is that any character set is acceptable.
If an Accept-Charset header is present, and if the server cannot send a response which is acceptable according to the Accept-Charset header, then the server SHOULD send an error response with the 406 (not acceptable) status code, though the sending of an unacceptable response is also allowed.
See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionAcceptCharset(String value) Constructor.AcceptCharset(Supplier<StringRanges> value) Constructor with delayed value.AcceptCharset(StringRanges value) Constructor.
- 
Method SummaryModifier and TypeMethodDescriptionstatic AcceptCharsetStatic creator.static AcceptCharsetof(Supplier<StringRanges> value) Static creator with delayed value.static AcceptCharsetof(StringRanges value) Static creator.Methods inherited from class org.apache.juneau.http.header.BasicStringRangesHeaderasStringRanges, getRange, getValue, match, of, of, of, orElse, toStringRangesMethods inherited from class org.apache.juneau.http.header.BasicHeaderassertName, assertStringValue, asString, equals, equalsIgnoreCase, get, getElements, getName, hashCode, isNotEmpty, isPresent, of, of, orElse, toString
- 
Constructor Details- 
AcceptCharsetConstructor.- Parameters:
- value- The header value.
 Must be parsable by- StringRanges.of(String).
 Can be- null .
 
- 
AcceptCharsetConstructor.- Parameters:
- value- The header value.
 Can be- null .
 
- 
AcceptCharsetConstructor with delayed value.Header value is re-evaluated on each call to BasicStringRangesHeader.getValue().- Parameters:
- value- The supplier of the header value.
 Can be- null .
 
 
- 
- 
Method Details- 
ofStatic creator.- Parameters:
- value- The header value.
 Must be parsable by- StringRanges.of(String).
 Can be- null .
- Returns:
- A new header bean, or null if the value isnull .
 
- 
ofStatic creator.- Parameters:
- value- The header value.
 Can be- null .
- Returns:
- A new header bean, or null if the value isnull .
 
- 
ofStatic creator with delayed value.Header value is re-evaluated on each call to BasicStringRangesHeader.getValue().- Parameters:
- value- The supplier of the header value.
 Can be- null .
- Returns:
- A new header bean, or null if the value isnull .
 
 
-