@ NotNull public static EnhancedMimeType create ( @ NotNull final String primary , @ NotNull final String sub , final Charset encoding , final String version , final Map < String , String > parameters ) { try { return new EnhancedMimeType ( primary , sub , encoding , version , parameters ) ; } catch ( final MimeTypeParseException ex ) { throw new RuntimeException ( "Failed to create versioned mime type: " + primary + "/" + sub , ex ) ; } }
Creates an instance with all data and exceptions wrapped to runtime exceptions .