public static MimeType getMimeType ( String value ) { if ( StringUtils . isNotBlank ( value ) ) { try { return getMimeTypes ( ) . forName ( value ) ; } catch ( MimeTypeException e ) { MediaType mediaType = getMediaType ( null , value ) ; if ( mediaType != null ) { try { return getMimeTypes ( ) . forName ( mediaType . toString ( ) ) ; } catch ( MimeTypeException e1 ) { // detection not successful } } } } return null ; }
Retrieves the MimeType object according to a name value