Module io.inverno.mod.http.base
Class ContentTypeCodec.ContentType
java.lang.Object
io.inverno.mod.http.base.internal.header.GenericHeader
io.inverno.mod.http.base.internal.header.ParameterizedHeader
io.inverno.mod.http.base.internal.header.ContentTypeCodec.ContentType
- All Implemented Interfaces:
Header,Headers.ContentType
- Enclosing class:
ContentTypeCodec
public static final class ContentTypeCodec.ContentType
extends ParameterizedHeader
implements Headers.ContentType
Headers.ContentType header implementation.
- Since:
- 1.0
- Author:
- Jeremy Kuhn
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class io.inverno.mod.http.base.internal.header.ParameterizedHeader
ParameterizedHeader.AbstractBuilder<A extends ParameterizedHeader,B extends ParameterizedHeader.AbstractBuilder<A, B>> -
Field Summary
Fields inherited from class io.inverno.mod.http.base.internal.header.ParameterizedHeader
parameterizedValue, parametersFields inherited from class io.inverno.mod.http.base.internal.header.GenericHeader
headerName, headerValueFields inherited from interface io.inverno.mod.http.base.header.Headers.ContentType
BOUNDARY, CHARSET -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the boundary.Returns the charset.Returns the media type composed of type and sub-type parts without parameters.Returns the sub-type part.getType()Returns the type part.Converts the content type to a media range.Methods inherited from class io.inverno.mod.http.base.internal.header.ParameterizedHeader
equals, getParameterizedValue, getParameters, hashCodeMethods inherited from class io.inverno.mod.http.base.internal.header.GenericHeader
getHeaderName, getHeaderValue, setHeaderValueMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.inverno.mod.http.base.header.Header
getHeaderName, getHeaderValueMethods inherited from interface io.inverno.mod.http.base.header.Headers.ContentType
getParameters
-
Constructor Details
-
ContentType
public ContentType(String mediaType, Charset charset, String boundary, Map<String, String> parameters) Creates a content-type header with the specified media type, charset, boundary and parameters.
- Parameters:
mediaType- a raw media typecharset- a charsetboundary- a boundaryparameters- a map of parameters
-
-
Method Details
-
getMediaType
Description copied from interface:Headers.ContentTypeReturns the media type composed of type and sub-type parts without parameters.
- Specified by:
getMediaTypein interfaceHeaders.ContentType- Returns:
- a raw media type
-
getType
Description copied from interface:Headers.ContentTypeReturns the type part.
- Specified by:
getTypein interfaceHeaders.ContentType- Returns:
- the type part
-
getSubType
Description copied from interface:Headers.ContentTypeReturns the sub-type part.
- Specified by:
getSubTypein interfaceHeaders.ContentType- Returns:
- the sub-type part
-
getBoundary
Description copied from interface:Headers.ContentTypeReturns the boundary.
- Specified by:
getBoundaryin interfaceHeaders.ContentType- Returns:
- the boundary or null
-
getCharset
Description copied from interface:Headers.ContentTypeReturns the charset.
- Specified by:
getCharsetin interfaceHeaders.ContentType- Returns:
- the charset of null
-
toMediaRange
Description copied from interface:Headers.ContentTypeConverts the content type to a media range.
- Specified by:
toMediaRangein interfaceHeaders.ContentType- Returns:
- the media range corresponding to the content type
-