public interface DataTypeParamsBuilder
DataType objects.
Implementations need not be thread safe.
| Modifier and Type | Method and Description |
|---|---|
DataType |
build()
Builds a new
DataType with the values set in this builder. |
DataTypeParamsBuilder |
charset(Charset charset)
Sets the given encoding.
|
DataTypeParamsBuilder |
charset(String charset)
Sets the given encoding.
|
DataTypeParamsBuilder |
mediaType(MediaType mediaType)
Sets the given
mediaType. |
DataTypeParamsBuilder |
mediaType(String mediaType)
Sets the given
mediaType string. |
DataTypeParamsBuilder mediaType(String mediaType)
mediaType string. See DataType.getMediaType().
If the media type for the given string has a charset parameter, that will be set as the encoding for the
DataType being built, unless it had been previously set.
An encoding set by a call to this method can be overridden by calling charset(String).
mediaType - the MIME type string to set. If null or empty, the builder is not changed.IllegalArgumentException - if the given media type string is invalid.DataTypeParamsBuilder mediaType(MediaType mediaType)
mediaType. See DataType.getMediaType().
If the media type for the given string has a charset parameter, that will be set as the encoding for the
DataType being built, unless it had been previously set.
An encoding set by a call to this method can be overridden by calling charset(String).
mediaType - the media type to set. If null, the builder is not changed.DataTypeParamsBuilder charset(String charset)
MediaType.getCharset().charset - the encoding to set. If null or empty, the builder is not changed.IllegalCharsetNameException - if the charset is invalid.DataTypeParamsBuilder charset(Charset charset)
MediaType.getCharset().charset - the encoding to set. If null or empty, the builder is not changed.Copyright © 2017 MuleSoft, Inc.. All rights reserved.