Package io.helidon.media.common
Class ContentTypeCharset
- java.lang.Object
-
- io.helidon.media.common.ContentTypeCharset
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CharsetdetermineCharset(Parameters headers)Returns theCharsetspecified in the content-type header, usingStandardCharsets.UTF_8as the default.static CharsetdetermineCharset(Parameters headers, Charset defaultCharset)Returns theCharsetspecified in the content type header.
-
-
-
Method Detail
-
determineCharset
public static Charset determineCharset(Parameters headers)
Returns theCharsetspecified in the content-type header, usingStandardCharsets.UTF_8as the default.- Parameters:
headers- The headers.- Returns:
- The charset.
-
determineCharset
public static Charset determineCharset(Parameters headers, Charset defaultCharset)
Returns theCharsetspecified in the content type header. If not provided or an error occurs on lookup, the given default is returned.- Parameters:
headers- The headers.defaultCharset- The default.- Returns:
- The charset.
-
-