MCPcopy Create free account
hub / github.com/M66B/FairEmail / cleanContentType

Method cleanContentType

app/src/main/java/com/sun/mail/util/MimeUtil.java:74–84  ·  view source on GitHub ↗

If a Content-Type handler has been specified, call it to clean up the Content-Type value. @param mp the MimePart @param contentType the Content-Type value @return the cleaned Content-Type value

(MimePart mp, String contentType)

Source from the content-addressed store, hash-verified

72 * @return the cleaned Content-Type value
73 */
74 public static String cleanContentType(MimePart mp, String contentType) {
75 if (cleanContentType != null) {
76 try {
77 return (String)cleanContentType.invoke(null,
78 new Object[] { mp, contentType });
79 } catch (Exception ex) {
80 return contentType;
81 }
82 } else
83 return contentType;
84 }
85
86 /**
87 * Convenience method to get our context class loader.

Callers 4

getContentTypeMethod · 0.95
getFileNameMethod · 0.95
setFileNameMethod · 0.95
getContentTypeMethod · 0.95

Calls 1

invokeMethod · 0.80

Tested by

no test coverage detected