Package javax.mail.internet
Class MimePartDataSource
- java.lang.Object
-
- javax.mail.internet.MimePartDataSource
-
- All Implemented Interfaces:
javax.activation.DataSource,MessageAware
public class MimePartDataSource extends java.lang.Object implements javax.activation.DataSource, MessageAware
A data source that manages content for a MIME part.- Version:
- 1.4
- Author:
- Chris Burdess
-
-
Constructor Summary
Constructors Constructor Description MimePartDataSource(MimePart part)Constructor with a MIME part.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetContentType()java.io.InputStreamgetInputStream()Returns an input stream from the MIME part.MessageContextgetMessageContext()Returns the message context for the current part.java.lang.StringgetName()java.io.OutputStreamgetOutputStream()
-
-
-
Field Detail
-
part
protected MimePart part
The part.- Since:
- JavaMail 1.4
-
-
Constructor Detail
-
MimePartDataSource
public MimePartDataSource(MimePart part)
Constructor with a MIME part.
-
-
Method Detail
-
getInputStream
public java.io.InputStream getInputStream() throws java.io.IOExceptionReturns an input stream from the MIME part.This method applies the appropriate transfer-decoding, based on the Content-Transfer-Encoding header of the MimePart.
- Specified by:
getInputStreamin interfacejavax.activation.DataSource- Throws:
java.io.IOException
-
getOutputStream
public java.io.OutputStream getOutputStream() throws java.io.IOException- Specified by:
getOutputStreamin interfacejavax.activation.DataSource- Throws:
java.io.IOException
-
getContentType
public java.lang.String getContentType()
- Specified by:
getContentTypein interfacejavax.activation.DataSource
-
getName
public java.lang.String getName()
- Specified by:
getNamein interfacejavax.activation.DataSource
-
getMessageContext
public MessageContext getMessageContext()
Returns the message context for the current part.- Specified by:
getMessageContextin interfaceMessageAware
-
-