|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjavax.mail.internet.MimePartDataSource
public class MimePartDataSource
A utility class that implements a DataSource out of a MimePart. This class is primarily meant for service providers.
MimePart,
DataSource| 字段摘要 | |
|---|---|
protected MimePart |
part
The MimePart that provides the data for this DataSource. |
| 构造方法摘要 | |
|---|---|
MimePartDataSource(MimePart part)
Constructor, that constructs a DataSource from a MimePart. |
|
| 方法摘要 | |
|---|---|
String |
getContentType()
Returns the content-type of this DataSource. |
InputStream |
getInputStream()
Returns an input stream from this MimePart. |
MessageContext |
getMessageContext()
Return the MessageContext for the current part. |
String |
getName()
DataSource method to return a name. |
OutputStream |
getOutputStream()
DataSource method to return an output stream. |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 字段详细信息 |
|---|
protected MimePart part
| 构造方法详细信息 |
|---|
public MimePartDataSource(MimePart part)
| 方法详细信息 |
|---|
public InputStream getInputStream()
throws IOException
This method applies the appropriate transfer-decoding, based on the Content-Transfer-Encoding attribute of this MimePart. Thus the returned input stream is a decoded stream of bytes.
This implementation obtains the raw content from the Part
using the getContentStream() method and decodes
it using the MimeUtility.decode() method.
DataSource 中的 getInputStreamIOExceptionMimeMessage.getContentStream(),
MimeBodyPart.getContentStream(),
MimeUtility.decode(java.io.InputStream, java.lang.String)
public OutputStream getOutputStream()
throws IOException
This implementation throws the UnknownServiceException.
DataSource 中的 getOutputStreamIOExceptionpublic String getContentType()
This implementation just invokes the getContentType
method on the MimePart.
DataSource 中的 getContentTypepublic String getName()
This implementation just returns an empty string.
DataSource 中的 getNamepublic MessageContext getMessageContext()
MessageContext for the current part.
MessageAware 中的 getMessageContext
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||