PreencodedMimeBodyPart (Java EE 5 SDK)
From Java
|
|
Java EE 5 SDK 深圳电信培训中心.徐海蛟老师. |
||||||||
| 上一个类 下一个类 | 框架 无框架 | ||||||||
| 摘要: 嵌套 | 字段 | 构造器 | 方法 | 详细信息: 字段 | 构造器 | 方法 | ||||||||
javax.mail.internet Class PreencodedMimeBodyPart
java.lang.Objectjavax.mail.BodyPart
javax.mail.internet.MimeBodyPart
javax.mail.internet.PreencodedMimeBodyPart
public class PreencodedMimeBodyPart
- extends MimeBodyPart
A MimeBodyPart that handles data that has already been encoded.
This class is useful when constructing a message and attaching
data that has already been encoded (for example, using base64
encoding). The data may have been encoded by the application,
or may have been stored in a file or database in encoded form.
The encoding is supplied when this object is created. The data
is attached to this object in the usual fashion, by using the
setText, setContent, or
setDataHandler methods.
- 从以下版本开始:
- JavaMail 1.4
| 字段摘要 |
|---|
| Fields inherited from class javax.mail.internet.MimeBodyPart |
|---|
content, contentStream, dh, headers |
| Fields inherited from class javax.mail.BodyPart |
|---|
parent |
| Fields inherited from interface javax.mail.Part |
|---|
ATTACHMENT, INLINE |
| 构造器摘要 | |
|---|---|
PreencodedMimeBodyPart(String encoding)
Create a PreencodedMimeBodyPart that assumes the data is encoded using the specified encoding. |
|
| 方法摘要 | |
|---|---|
String |
getEncoding()
Returns the content transfer encoding specified when this object was created. |
protected void |
updateHeaders()
Force the Content-Transfer-Encoding header to use
the encoding that was specified when this object was created. |
void |
writeTo(OutputStream os)
Output the body part as an RFC 822 format stream. |
| 类方法继承 javax.mail.BodyPart |
|---|
getParent |
| 类方法继承 java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 构造器详细信息 |
|---|
PreencodedMimeBodyPart
public PreencodedMimeBodyPart(String encoding)
- Create a PreencodedMimeBodyPart that assumes the data is
encoded using the specified encoding. The encoding must
be a MIME supported Content-Transfer-Encoding.
| 方法详细信息 |
|---|
getEncoding
public String getEncoding() throws MessagingException
- Returns the content transfer encoding specified when
this object was created.
- 规范说明:
getEncodingin interfaceMimePart- 重写:
getEncodingin classMimeBodyPart
- 返回:
- content-transfer-encoding
- 抛出异常:
MessagingException- 另请参见:
MimeBodyPart.headers
writeTo
public void writeTo(OutputStream os) throws IOException, MessagingException
- Output the body part as an RFC 822 format stream.
- 规范说明:
writeToin interfacePart- 重写:
writeToin classMimeBodyPart
- 抛出异常:
MessagingExceptionIOException- if an error occurs writing to the stream or if an error is generated by the javax.activation layer.- 另请参见:
DataHandler.writeTo(java.io.OutputStream)
updateHeaders
protected void updateHeaders()
throws MessagingException
- Force the
Content-Transfer-Encodingheader to use the encoding that was specified when this object was created. - 重写:
updateHeadersin classMimeBodyPart
- 抛出异常:
MessagingException
|
|
Java EE 5 SDK 深圳电信培训中心.徐海蛟老师. |
||||||||
| 上一个类 下一个类 | 框架 无框架 | ||||||||
| 摘要: 嵌套 | 字段 | 构造器 | 方法 | 详细信息: 字段 | 构造器 | 方法 | ||||||||
提交错误或意见
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。深圳电信培训中心.徐海蛟老师教学参考.