public class MediaTypes
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static MediaType |
getMediaType(java.lang.String typeDef)
Returns the MediaType object for the given type string or null if not found.
|
static IStringPair |
parse(java.lang.String typeDef)
Splitting up a given media type string into its type and sub-type.
|
public static MediaType getMediaType(java.lang.String typeDef)
typeDef
- The type definition (e.g. "image/jpg") (must not be null).java.lang.IllegalArgumentException
- If the given typeDef is null or otherwise no valid media type definition.public static IStringPair parse(java.lang.String typeDef)
typeDef
- The media type string to be split-up in its type and sub-type (must not be null).java.lang.IllegalArgumentException
- if parsing the string fails.