javax.mail.internet
Class MimePartDataSource

java.lang.Object
  extended by javax.mail.internet.MimePartDataSource
All Implemented Interfaces:
MessageAware

public class MimePartDataSource
extends java.lang.Object
implements MessageAware

A data source that manages content for a MIME part.


Constructor Summary
MimePartDataSource(MimePart part)
          Constructor with a MIME part.
 
Method Summary
 java.lang.String getContentType()
           
 java.io.InputStream getInputStream()
          Returns an input stream from the MIME part.
 MessageContext getMessageContext()
          Returns the message context for the current part.
 java.lang.String getName()
           
 java.io.OutputStream getOutputStream()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MimePartDataSource

public MimePartDataSource(MimePart part)
Constructor with a MIME part.

Method Detail

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Returns an input stream from the MIME part.

This method applies the appropriate transfer-decoding, based on the Content-Transfer-Encoding header of the MimePart.

Throws:
java.io.IOException

getOutputStream

public java.io.OutputStream getOutputStream()
                                     throws java.io.IOException
Throws:
java.io.IOException

getContentType

public java.lang.String getContentType()

getName

public java.lang.String getName()

getMessageContext

public MessageContext getMessageContext()
Returns the message context for the current part.

Specified by:
getMessageContext in interface MessageAware