Class MimeBodyPart.EncodedFileDataSource

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String contentType  
      private java.lang.String encoding  
    • Constructor Summary

      Constructors 
      Constructor Description
      EncodedFileDataSource​(java.io.File file, java.lang.String contentType, java.lang.String encoding)  
    • Field Detail

      • contentType

        private java.lang.String contentType
      • encoding

        private java.lang.String encoding
    • Constructor Detail

      • EncodedFileDataSource

        public EncodedFileDataSource​(java.io.File file,
                                     java.lang.String contentType,
                                     java.lang.String encoding)
    • Method Detail

      • getContentType

        public java.lang.String getContentType()
        Description copied from class: FileDataSource
        This method returns the MIME type of the data in the form of a string. This method uses the currently installed FileTypeMap. If there is no FileTypeMap explictly set, the FileDataSource will call the getDefaultFileTypeMap method on FileTypeMap to acquire a default FileTypeMap. Note: By default, the FileTypeMap used will be a MimetypesFileTypeMap.
        Specified by:
        getContentType in interface DataSource
        Overrides:
        getContentType in class FileDataSource
        Returns:
        the MIME Type
        See Also:
        FileTypeMap.getDefaultFileTypeMap()
      • getEncoding

        public java.lang.String getEncoding()
        Description copied from interface: EncodingAware
        Return the MIME Content-Transfer-Encoding to use for this data, or null to indicate that an appropriate value should be chosen by the caller.
        Specified by:
        getEncoding in interface EncodingAware
        Returns:
        the Content-Transfer-Encoding value, or null