from

fun Charsets.from(mediaType: MediaType, default: Charset = UTF_8): Charset

Look up a CharSet based on a given media type's charset parameter.

Return

Charset from the mediaType or the default.

Parameters

mediaType

MediaType to derive the CharSet from.

default

If mediaType doesn't have a charset parameter, this value is returned.