javax.mail.internet

Class MimePartDataSource

Implemented Interfaces:
DataSource, MessageAware

public class MimePartDataSource
extends java.lang.Object
implements DataSource, MessageAware

A data source that manages content for a MIME part.
Version:
1.4
Author:
Chris Burdess

Field Summary

protected MimePart
part
The part.

Constructor Summary

MimePartDataSource(MimePart part)
Constructor with a MIME part.

Method Summary

String
getContentType()
InputStream
getInputStream()
Returns an input stream from the MIME part.
MessageContext
getMessageContext()
Returns the message context for the current part.
String
getName()
OutputStream
getOutputStream()

Field Details

part

protected MimePart part
The part.
Since:
JavaMail 1.4

Constructor Details

MimePartDataSource

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

Method Details

getContentType

public String getContentType()

getInputStream

public InputStream getInputStream()
            throws 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.


getMessageContext

public MessageContext getMessageContext()
Returns the message context for the current part.
Specified by:
getMessageContext in interface MessageAware

getName

public String getName()

getOutputStream

public OutputStream getOutputStream()
            throws IOException

© Copyright 2003, 2004 The Free Software Foundation, All rights reserved