java.lang.Object
io.inverno.mod.http.base.header.AbstractHeaderCodec<AcceptCodec.Accept,AcceptCodec.Accept.Builder>
io.inverno.mod.http.base.internal.header.ParameterizedHeaderCodec<AcceptCodec.Accept,AcceptCodec.Accept.Builder>
io.inverno.mod.http.base.internal.header.AcceptCodec
- All Implemented Interfaces:
HeaderCodec<AcceptCodec.Accept>
public class AcceptCodec
extends ParameterizedHeaderCodec<AcceptCodec.Accept,AcceptCodec.Accept.Builder>
Accept HTTP HeaderCodec implementation.
- Since:
- 1.0
- Author:
- Jeremy Kuhn
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class io.inverno.mod.http.base.internal.header.ParameterizedHeaderCodec
DEFAULT_PARAMETER_DELIMITER, DEFAULT_VALUE_DELIMITER, parameterDelimiter, parameterValueDelimiter, valueDelimiterFields inherited from class io.inverno.mod.http.base.header.AbstractHeaderCodec
builderSupplier, supportedHeaderNames -
Constructor Summary
ConstructorsConstructorDescriptionCreates an accept header codec that allows multiple media ranges to be specified in the header value.AcceptCodec(boolean allowMultiple) Creates an accept header codec that allows or not multiple media ranges to be specified in the header value. -
Method Summary
Modifier and TypeMethodDescriptionencodeValue(AcceptCodec.Accept headerField) Encodes the value of the specified header as a string.Methods inherited from class io.inverno.mod.http.base.internal.header.ParameterizedHeaderCodec
decode, decode, encodeMethods inherited from class io.inverno.mod.http.base.header.AbstractHeaderCodec
getSupportedHeaderNamesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.inverno.mod.http.base.header.HeaderCodec
encode, encodeValue
-
Constructor Details
-
AcceptCodec
public AcceptCodec()Creates an accept header codec that allows multiple media ranges to be specified in the header value.
-
AcceptCodec
public AcceptCodec(boolean allowMultiple) Creates an accept header codec that allows or not multiple media ranges to be specified in the header value.
- Parameters:
allowMultiple- true to allow multiple media ranges, false otherwise
-
-
Method Details
-
encodeValue
Description copied from interface:HeaderCodecEncodes the value of the specified header as a string.
The resulting value corresponds to the header field value as defined by RFC 7230 Section 3.2.
- Specified by:
encodeValuein interfaceHeaderCodec<AcceptCodec.Accept>- Overrides:
encodeValuein classParameterizedHeaderCodec<AcceptCodec.Accept,AcceptCodec.Accept.Builder> - Parameters:
headerField- the header to encode- Returns:
- the encoded header value
-