JavaMail 1.2
============
Following is a description of the new APIs that are being
introduced in JavaMail 1.2. The numbers in parentheses
are bug numbers; you can find more information about the
bug reports at:
http://developer.java.sun.com/developer/bugParade/index.html
Please send comments and feedback to javamail@sun.com.
===================================================================
1. New protected field and methods (4129743)
--------------------------------------------
To simplify creating subclasses of MimeMessage, the following
field and method that were previously private are now protected:
/**
* A flag indicating whether the message has been modified.
* If the message has not been modified, any data in the
* <code>content</code> array is assumed to be valid and is used
* directly in the <code>writeTo</code> method. This flag is
* set to true when an empty message is created or when the
* <code>saveChanges</code> method is called.
*/
protected boolean modified = false;
/**
* Parse the InputStream setting the <code>headers</code> and
* <code>content</code> fields appropriately. Also resets the
* <code>modified</code> flag. <p>
*
* This method is intended for use by subclasses that need to
* control when the InputStream is parsed.
*
* @param is The message input stream
* @exception MessagingException
*/
protected void parse(InputStream is) throws MessagingException
The javadocs for the following exsting methods have been updated to
describe the use of the modified flag:
/**
* Default constructor. An empty message object is created.
* The <code>headers</code> field is set to an empty InternetHeaders
* object. The <code>flags</code> field is set to an empty Flags
* object. The <code>modified</code> flag is set to true.
*/
public MimeMessage(Session session)
/**
* Output the message as an RFC 822 format stream, without
* specified headers. If the <code>modified</code> flag is not
* set and the <code>content</code> array is not null, the
* <code>content</code> array is written directly, after
* writing the appropriate message headers.
*
* @exception javax.mail.MessagingException
* @exception IOException if an error occurs writing to the stream
* or if an error is generated by the
* javax.activation layer.
* @see javax.activation.DataHandler#writeTo
*/
public void writeTo(OutputStream os, String[] ignoreList)
throws IOException, MessagingException
/**
* Updates the appropriate header fields of this message to be
* consistent with the message's contents. If this message is
* contained in a Folder, any changes made to this message are
* committed to the containing folder. <p>
*
* If any part of a message's headers or contents are changed,
* <code>saveChanges</code> must be called to ensure that those
* changes are permanent. Otherwise, any such modifications may or
* may not be saved, depending on the folder implementation. <p>
*
* Messages obtained from folders opened READ_ONLY should not be
* modified and saveChanges should not be called on such messages. <p>
*
* This method sets the <code>modified</code> flag to true and then
* calls the <code>updateHeaders<code> method.
*
* @exception IllegalWriteException if the underlying
* implementation does not support modification
* @exception IllegalStateException if this message is
* obtained from a READ_ONLY folder.
* @exception MessagingException
*/
public void saveChanges() throws MessagingException
The following method is added to MimeMessage:
/**
* Create and return an InternetHeaders object that loads the
* headers from the given InputStream. Subclasses can override
* this method to return a subclass of InternetHeaders, if
* necessary. This implementation simply constructs and returns
* an InternetHeaders object.
*
* @param is the InputStream to read the headers from
* @exception MessagingException
*/
protected InternetHeaders createInternetHeaders(InputStream is)
throws MessagingException
Likewise, to simplify creating subclasses of MimeMultipart, the parse
method is made protected:
/**
* Parse the InputStream from our DataSource, constructing the
* appropriate MimeBodyParts. The <code>parsed</code> flag is
* set to true, and if true on entry nothing is done. This
* method is called by all other methods that need data for
* the body parts, to make sure the data has been parsed.
*/
protected synchronized void parse() throws MessagingException
and the following protected methods are added:
/**
* Create and return an InternetHeaders object that loads the
* headers from the given InputStream. Subclasses can override
* this method to return a subclass of InternetHeaders, if
* necessary. This implementation simply constructs and returns
* an InternetHeaders object.
*
* @param is the InputStream to read the headers from
* @exception MessagingException
*/
protected InternetHeaders createInternetHeaders(InputStream is)
throws MessagingException
/**
* Create and return a MimeBodyPart object to represent a
* body part parsed from the InputStream. Subclasses can override
* this method to return a subclass of MimeBodyPart, if
* necessary. This implementation simply constructs and returns
* a MimeBodyPart object.
*
* @param headers the headers for the body part
* @param content the content ofthe body part
* @exception MessagingException
*/
protected MimeBodyPart createMimeBodyPart(InternetHeaders headers,
byte[] content) throws MessagingException
/**
* Create and return a MimeBodyPart object to represent a
* body part parsed from the InputStream. Subclasses can override
* this method to return a subclass of MimeBodyPart, if
* necessary. This implementation simply constructs and returns
* a MimeBodyPart object.
*
* @param is InputStream containing the body part
* @exception MessagingException
*/
protected MimeBodyPart createMimeBodyPart(InputStream is)
throws MessagingException
===================================================================
2. MimeMessage and MimeBodyPart getRawInputStream method (4124840)
------------------------------------------------------------------
In some cases it is desirable to get the data for a body part
before JavaMail attempts to decode it. This is particularly important
if the Content-Transfer-Encoding header is incorrect. (For example,
some mail software is known to use "7-bit" instead of the MIME
defined "7bit".) Access to this data is currently provided
through the protected getContentStream method. Since simply
making this method public has the potential to cause a source
incompatibility for any subclasses that declare this method as
protected, we instead add a new public method that calls this
protected method:
/**
* Return an InputStream to the raw data with any Content-Transfer-Encoding
* intact. This method is useful if the "Content-Transfer-Encoding"
* header is incorrect or corrupt, which would prevent the
* <code>getInputStream</code> method or <code>getContent</code> method
* from returning the correct data. In such a case the application may
* use this method and attempt to decode the raw data itsel
没有合适的资源?快使用搜索试试~ 我知道了~
基于STM32设计的闹钟设置与邮件通知智能家居系统.zip-毕设/课设/项目/实训
共545个文件
html:370个
java:53个
txt:19个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 99 浏览量
2024-03-22
11:27:22
上传
评论
收藏 3.72MB ZIP 举报
温馨提示
基于STM32设计的闹钟设置与邮件通知智能家居系统实现: 1、stm32实现闹钟功能 2、通过Java串口通信设置stm32闹钟 3、stm32闹钟发生,Java监测到串口数据并接受 4、Java发送邮件通知设置人 实现STM32闹钟,串口通信,开发工具:STM32开发板、Keilu5、Eclipse【资源价值】所有源码经过测试,可直接运行,拿到资料包后根据引脚定义进行硬件连线及烧录源码便可轻松复刻出一样的项目,轻松copy。有任何使用问题欢迎随时与博主沟通,博主会及时解答#博主专注于嵌入式领域#欢迎交流【适合场景】相关项目设计中,可应用在学习/练手、毕业设计、课程设计、期末/期中/大作业、工程实训、竞赛学习等方面,可借鉴此优质项目实现复刻,也可以基于此项目进行扩展来开发更多功能 【资源内容】包含完整源码+工程文件+说明介绍 # 资源硬件部分若不会画PCB电路,可选择根据引脚定义将其代替为面包板+杜邦线+外设模块的方式,只需简单连线,下载源码烧录进去便可轻松复刻
资源推荐
资源详情
资源评论
收起资源包目录
基于STM32设计的闹钟设置与邮件通知智能家居系统.zip-毕设/课设/项目/实训 (545个子文件)
AlarmProject.axf 228KB
build.bat 2KB
system_stm32f10x.c 35KB
delay.c 7KB
sys.c 6KB
usart.c 4KB
clock.c 3KB
uartContact.c 3KB
setNVIC.c 904B
beep.c 353B
main.c 149B
ContactByUart.class 5KB
ContactByUart.class 5KB
SendEmail.class 2KB
SendEmail$1.class 766B
test.class 652B
.classpath 416B
.classpath 374B
sys.crf 221KB
uartcontact.crf 220KB
clock.crf 220KB
main.crf 219KB
beep.crf 219KB
system_stm32f10x.crf 219KB
setnvic.crf 217KB
stylesheet.css 11KB
uartcontact.d 388B
clock.d 365B
main.d 359B
beep.d 318B
system_stm32f10x.d 292B
setnvic.d 278B
sys.d 250B
startup_stm32f10x_hd.d 58B
AlarmProject_Target 1.dep 5KB
titlebar.gif 10KB
background.gif 2KB
titlebar_end.gif 849B
tab.gif 291B
stm32f10x.h 611KB
core_cm3.h 82KB
core_cmInstr.h 25KB
core_cmFunc.h 16KB
sys.h 4KB
clock.h 2KB
system_stm32f10x.h 2KB
delay.h 2KB
usart.h 1KB
beep.h 262B
setNVIC.h 246B
uartContact.h 227B
stm32f10x_conf.h 0B
main.h 0B
AlarmProject.hex 8KB
AlarmProject.htm 38KB
AlarmProject.build_log.htm 1KB
MessagingException.html 272KB
MimeMessage.html 189KB
index-7.html 160KB
IMAPMessage.html 151KB
IMAPFolder.html 147KB
Folder.html 121KB
MimeBodyPart.html 117KB
index-19.html 103KB
SMTPTransport.html 79KB
MailHandler.html 76KB
Message.html 66KB
POP3Message.html 64KB
IMAPStore.html 62KB
Message.html 60KB
Session.html 59KB
Address.html 58KB
POP3Folder.html 58KB
Part.html 56KB
MimeUtility.html 53KB
index-13.html 53KB
InternetAddress.html 50KB
MimeMultipart.html 48KB
serialized-form.html 46KB
Folder.html 46KB
SMTPMessage.html 45KB
MultipartReport.html 43KB
Service.html 43KB
SharedFileInputStream.html 41KB
MailSSLSocketFactory.html 40KB
package-use.html 37KB
overview-tree.html 37KB
index-1.html 37KB
Store.html 35KB
MimePart.html 35KB
index-3.html 35KB
InternetHeaders.html 35KB
MailDateFormat.html 34KB
index-18.html 33KB
MessageHeaders.html 32KB
index-9.html 32KB
POP3Store.html 32KB
GmailMessage.html 30KB
GmailStore.html 29KB
GmailFolder.html 29KB
共 545 条
- 1
- 2
- 3
- 4
- 5
- 6
资源评论
阿齐Archie
- 粉丝: 4w+
- 资源: 2474
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功