站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 1.2.9 API 文档英文版

SmartMimeMessage (Spring Framework) - Spring Framework 1.2.9 API 文档英文版


org.springframework.mail.javamail
Class SmartMimeMessage

java.lang.Object
  extended by javax.mail.Message
      extended by javax.mail.internet.MimeMessage
          extended by org.springframework.mail.javamail.SmartMimeMessage
All Implemented Interfaces:
MimePart, Part

 class SmartMimeMessage
extends MimeMessage

Special subclass of the standard JavaMail MimeMessage, carrying a default encoding to be used when populating the message and a default Java Activation FileTypeMap to be used for resolving attachment types.

Created by JavaMailSenderImpl in case of a specified default encoding and/or default FileTypeMap. Autodetected by MimeMessageHelper, which will use the carried encoding and FileTypeMap unless explicitly overridden.

Since:
1.2
Author:
Juergen Hoeller
See Also:
JavaMailSenderImpl.createMimeMessage(), MimeMessageHelper.getDefaultEncoding(javax.mail.internet.MimeMessage), MimeMessageHelper.getDefaultFileTypeMap(javax.mail.internet.MimeMessage)

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.mail.internet.MimeMessage
MimeMessage.RecipientType
 
Field Summary
 
Fields inherited from class javax.mail.internet.MimeMessage
content, contentStream, dh, flags, headers, modified, saved
 
Fields inherited from class javax.mail.Message
expunged, folder, msgnum, session
 
Fields inherited from interface javax.mail.Part
ATTACHMENT, INLINE
 
Constructor Summary
SmartMimeMessage(Session session, String defaultEncoding, FileTypeMap defaultFileTypeMap)
          Create a new SmartMimeMessage.
 
Method Summary
 String getDefaultEncoding()
          Return the default encoding of this message, or null if none.
 FileTypeMap getDefaultFileTypeMap()
          Return the default FileTypeMap of this message, or null if none.
 
Methods inherited from class javax.mail.internet.MimeMessage
addFrom, addHeader, addHeaderLine, addRecipients, addRecipients, createInternetHeaders, getAllHeaderLines, getAllHeaders, getAllRecipients, getContent, getContentID, getContentLanguage, getContentMD5, getContentStream, getContentType, getDataHandler, getDescription, getDisposition, getEncoding, getFileName, getFlags, getFrom, getHeader, getHeader, getInputStream, getLineCount, getMatchingHeaderLines, getMatchingHeaders, getMessageID, getNonMatchingHeaderLines, getNonMatchingHeaders, getRawInputStream, getReceivedDate, getRecipients, getReplyTo, getSender, getSentDate, getSize, getSubject, isMimeType, isSet, parse, removeHeader, reply, saveChanges, setContent, setContent, setContentID, setContentLanguage, setContentMD5, setDataHandler, setDescription, setDescription, setDisposition, setFileName, setFlags, setFrom, setFrom, setHeader, setRecipients, setRecipients, setReplyTo, setSender, setSentDate, setSubject, setSubject, setText, setText, updateHeaders, writeTo, writeTo
 
Methods inherited from class javax.mail.Message
addRecipient, getFolder, getMessageNumber, isExpunged, match, setExpunged, setFlag, setMessageNumber, setRecipient
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SmartMimeMessage

public SmartMimeMessage(Session session,
                        String defaultEncoding,
                        FileTypeMap defaultFileTypeMap)
Create a new SmartMimeMessage.

Parameters:
session - the JavaMail Session to create the message for
defaultEncoding - the default encoding, or null if none
defaultFileTypeMap - the default FileTypeMap, or null if none
Method Detail

getDefaultEncoding

public String getDefaultEncoding()
Return the default encoding of this message, or null if none.


getDefaultFileTypeMap

public FileTypeMap getDefaultFileTypeMap()
Return the default FileTypeMap of this message, or null if none.



Copyright (c) 2002-2007 The Spring Framework Project.