Module io.inverno.mod.http.base
Class ContentTypeCodec
java.lang.Object
io.inverno.mod.http.base.header.AbstractHeaderCodec<ContentTypeCodec.ContentType,ContentTypeCodec.ContentType.Builder>
io.inverno.mod.http.base.internal.header.ParameterizedHeaderCodec<ContentTypeCodec.ContentType,ContentTypeCodec.ContentType.Builder>
io.inverno.mod.http.base.internal.header.ContentTypeCodec
- All Implemented Interfaces:
HeaderCodec<ContentTypeCodec.ContentType>
public class ContentTypeCodec
extends ParameterizedHeaderCodec<ContentTypeCodec.ContentType,ContentTypeCodec.ContentType.Builder>
Content-type 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionencodeValue(ContentTypeCodec.ContentType headerField) Encodes the value of the specified header as a string.static StringGenerates a random multipart boundary.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
-
ContentTypeCodec
public ContentTypeCodec()Creates a content-type header codec.
-
-
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<ContentTypeCodec.ContentType>- Overrides:
encodeValuein classParameterizedHeaderCodec<ContentTypeCodec.ContentType,ContentTypeCodec.ContentType.Builder> - Parameters:
headerField- the header to encode- Returns:
- the encoded header value
-
generateMultipartBoundary
Generates a random multipart boundary.
- Returns:
- a multipart boundary
-