javax.mail
Interface Part

All Known Subinterfaces:
MimePart
All Known Implementing Classes:
BodyPart, Message, MimeBodyPart, MimeMessage

public interface Part

Note: Parts are used in Collections so implementing classes must provide a suitable implementation of equals and hashCode.

Version:
$Rev: 128416 $ $Date: 2005-01-27 12:46:59 -0700 (Thu, 27 Jan 2005) $

Field Summary
static java.lang.String ATTACHMENT
           
static java.lang.String INLINE
           
 
Method Summary
 void addHeader(java.lang.String name, java.lang.String value)
           
 java.util.Enumeration getAllHeaders()
           
 java.lang.Object getContent()
           
 java.lang.String getContentType()
           
 DataHandler getDataHandler()
           
 java.lang.String getDescription()
           
 java.lang.String getDisposition()
           
 java.lang.String getFileName()
           
 java.lang.String[] getHeader(java.lang.String name)
           
 java.io.InputStream getInputStream()
           
 int getLineCount()
           
 java.util.Enumeration getMatchingHeaders(java.lang.String[] names)
           
 java.util.Enumeration getNonMatchingHeaders(java.lang.String[] names)
           
 int getSize()
           
 boolean isMimeType(java.lang.String mimeType)
           
 void removeHeader(java.lang.String name)
           
 void setContent(Multipart content)
           
 void setContent(java.lang.Object content, java.lang.String type)
           
 void setDataHandler(DataHandler handler)
           
 void setDescription(java.lang.String description)
           
 void setDisposition(java.lang.String disposition)
           
 void setFileName(java.lang.String name)
           
 void setHeader(java.lang.String name, java.lang.String value)
           
 void setText(java.lang.String content)
           
 void writeTo(java.io.OutputStream out)
           
 

Field Detail

ATTACHMENT

public static final java.lang.String ATTACHMENT
See Also:
Constant Field Values

INLINE

public static final java.lang.String INLINE
See Also:
Constant Field Values
Method Detail

addHeader

public void addHeader(java.lang.String name,
                      java.lang.String value)
               throws MessagingException
Throws:
MessagingException

getAllHeaders

public java.util.Enumeration getAllHeaders()
                                    throws MessagingException
Throws:
MessagingException

getContent

public java.lang.Object getContent()
                            throws java.io.IOException,
                                   MessagingException
Throws:
java.io.IOException
MessagingException

getContentType

public java.lang.String getContentType()
                                throws MessagingException
Throws:
MessagingException

getDataHandler

public DataHandler getDataHandler()
                           throws MessagingException
Throws:
MessagingException

getDescription

public java.lang.String getDescription()
                                throws MessagingException
Throws:
MessagingException

getDisposition

public java.lang.String getDisposition()
                                throws MessagingException
Throws:
MessagingException

getFileName

public java.lang.String getFileName()
                             throws MessagingException
Throws:
MessagingException

getHeader

public java.lang.String[] getHeader(java.lang.String name)
                             throws MessagingException
Throws:
MessagingException

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException,
                                          MessagingException
Throws:
java.io.IOException
MessagingException

getLineCount

public int getLineCount()
                 throws MessagingException
Throws:
MessagingException

getMatchingHeaders

public java.util.Enumeration getMatchingHeaders(java.lang.String[] names)
                                         throws MessagingException
Throws:
MessagingException

getNonMatchingHeaders

public java.util.Enumeration getNonMatchingHeaders(java.lang.String[] names)
                                            throws MessagingException
Throws:
MessagingException

getSize

public int getSize()
            throws MessagingException
Throws:
MessagingException

isMimeType

public boolean isMimeType(java.lang.String mimeType)
                   throws MessagingException
Throws:
MessagingException

removeHeader

public void removeHeader(java.lang.String name)
                  throws MessagingException
Throws:
MessagingException

setContent

public void setContent(Multipart content)
                throws MessagingException
Throws:
MessagingException

setContent

public void setContent(java.lang.Object content,
                       java.lang.String type)
                throws MessagingException
Throws:
MessagingException

setDataHandler

public void setDataHandler(DataHandler handler)
                    throws MessagingException
Throws:
MessagingException

setDescription

public void setDescription(java.lang.String description)
                    throws MessagingException
Throws:
MessagingException

setDisposition

public void setDisposition(java.lang.String disposition)
                    throws MessagingException
Throws:
MessagingException

setFileName

public void setFileName(java.lang.String name)
                 throws MessagingException
Throws:
MessagingException

setHeader

public void setHeader(java.lang.String name,
                      java.lang.String value)
               throws MessagingException
Throws:
MessagingException

setText

public void setText(java.lang.String content)
             throws MessagingException
Throws:
MessagingException

writeTo

public void writeTo(java.io.OutputStream out)
             throws java.io.IOException,
                    MessagingException
Throws:
java.io.IOException
MessagingException