Package com.helger.commons.mime
Class MimeTypeHelper
java.lang.Object
com.helger.commons.mime.MimeTypeHelper
Contains some utility methods for handling MIME types.
- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptionstatic CharsetgetCharsetFromMimeType(IMimeType aMimeType) Determine the charset from the provided MIME type.static StringgetCharsetNameFromMimeType(IMimeType aMimeType) Determine the charset name from the provided MIME type.
-
Method Details
-
getCharsetNameFromMimeType
Determine the charset name from the provided MIME type.- Parameters:
aMimeType- The MIME type to query. May benull.- Returns:
nullif no MIME type was provided or if the MIME type does not contain a "charset" parameter
-
getCharsetFromMimeType
Determine the charset from the provided MIME type.- Parameters:
aMimeType- The MIME type to query. May benull.- Returns:
nullif no MIME type was provided or if the MIME type does not contain a "charset" parameter or if the provided charset name is invalid.
-