Package org.apache.axiom.mime
Class ContentType.Builder
java.lang.Object
org.apache.axiom.mime.ContentType.Builder
- Enclosing class:
- ContentType
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build theContentType
object.Remove all parameters.Get the media type.getParameter
(String name) Get the specified parameter value.removeParameter
(String name) Remove the parameter with the specified name.setMediaType
(MediaType mediaType) Set the media type.setParameter
(String name, String value) Set the specified parameter value.
-
Method Details
-
getMediaType
Get the media type.- Returns:
- the media type
-
setMediaType
Set the media type.- Parameters:
mediaType
- the media type- Returns:
- the builder
-
getParameter
Get the specified parameter value.- Parameters:
name
- the parameter name- Returns:
- the parameter value, or
null
if no parameter with the given name was found
-
setParameter
Set the specified parameter value. If a parameter with the given name already exists, it will be replaced. If the value isnull
, the parameter will be removed. Note that parameter names are case insensitive.- Parameters:
name
- the parameter namevalue
- the parameter value- Returns:
- the builder
-
removeParameter
Remove the parameter with the specified name.- Parameters:
name
- the parameter name- Returns:
- the builder
-
clearParameters
Remove all parameters.- Returns:
- the builder
-
build
Build theContentType
object.- Returns:
- the
ContentType
object
-