Class MimeUtil


  • public class MimeUtil
    extends java.lang.Object
    General MIME-related utility methods.
    Since:
    JavaMail 1.4.4
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.lang.reflect.Method cleanContentType  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private MimeUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String cleanContentType​(MimePart mp, java.lang.String contentType)
      If a Content-Type handler has been specified, call it to clean up the Content-Type value.
      private static java.lang.ClassLoader getContextClassLoader()
      Convenience method to get our context class loader.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • cleanContentType

        private static final java.lang.reflect.Method cleanContentType
    • Constructor Detail

      • MimeUtil

        private MimeUtil()
    • Method Detail

      • cleanContentType

        public static java.lang.String cleanContentType​(MimePart mp,
                                                        java.lang.String contentType)
        If a Content-Type handler has been specified, call it to clean up the Content-Type value.
        Parameters:
        mp - the MimePart
        contentType - the Content-Type value
        Returns:
        the cleaned Content-Type value
      • getContextClassLoader

        private static java.lang.ClassLoader getContextClassLoader()
        Convenience method to get our context class loader. Assert any privileges we might have and then call the Thread.getContextClassLoader method.