- java.lang.Object
-
- io.helidon.common.http.MediaType.Builder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MediaType.Builder
addParameter(String parameter, String value)
Add a new parameter to the parameter map.MediaType
build()
Build the instance from this builder.MediaType.Builder
charset(String charset)
Character set of the media type.MediaType.Builder
parameters(Map<String,String> parameters)
Parameters of the media type.MediaType.Builder
subtype(String subtype)
Subtype of the new media type.MediaType.Builder
type(String type)
Type of the new media type.
-
-
-
Method Detail
-
build
public MediaType build()
Description copied from interface:Builder
Build the instance from this builder.
-
type
public MediaType.Builder type(String type)
Type of the new media type.- Parameters:
type
- the primary type, default is "*"- Returns:
- updated builder instance
-
subtype
public MediaType.Builder subtype(String subtype)
Subtype of the new media type.- Parameters:
subtype
- the secondary type, default is "*"- Returns:
- updated builder instance
-
charset
public MediaType.Builder charset(String charset)
Character set of the media type.
-
addParameter
public MediaType.Builder addParameter(String parameter, String value)
Add a new parameter to the parameter map.- Parameters:
parameter
- name of the parameter to addvalue
- value of the parameter to add- Returns:
- updated builder instance
-
parameters
public MediaType.Builder parameters(Map<String,String> parameters)
Parameters of the media type.- Parameters:
parameters
- a map of media type parameters, default is empty- Returns:
- updated builder instance
-
-