javax.mail
Interface Part

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

public interface Part

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

Version:
$Rev: 421852 $ $Date: 2006-07-14 03:02:19 -0700 (Fri, 14 Jul 2006) $

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

Field Detail

ATTACHMENT

static final String ATTACHMENT
See Also:
Constant Field Values

INLINE

static final String INLINE
See Also:
Constant Field Values
Method Detail

addHeader

void addHeader(String name,
               String value)
               throws MessagingException
Throws:
MessagingException

getAllHeaders

Enumeration getAllHeaders()
                          throws MessagingException
Throws:
MessagingException

getContent

Object getContent()
                  throws IOException,
                         MessagingException
Throws:
IOException
MessagingException

getContentType

String getContentType()
                      throws MessagingException
Throws:
MessagingException

getDataHandler

DataHandler getDataHandler()
                           throws MessagingException
Throws:
MessagingException

getDescription

String getDescription()
                      throws MessagingException
Throws:
MessagingException

getDisposition

String getDisposition()
                      throws MessagingException
Throws:
MessagingException

getFileName

String getFileName()
                   throws MessagingException
Throws:
MessagingException

getHeader

String[] getHeader(String name)
                   throws MessagingException
Throws:
MessagingException

getInputStream

InputStream getInputStream()
                           throws IOException,
                                  MessagingException
Throws:
IOException
MessagingException

getLineCount

int getLineCount()
                 throws MessagingException
Throws:
MessagingException

getMatchingHeaders

Enumeration getMatchingHeaders(String[] names)
                               throws MessagingException
Throws:
MessagingException

getNonMatchingHeaders

Enumeration getNonMatchingHeaders(String[] names)
                                  throws MessagingException
Throws:
MessagingException

getSize

int getSize()
            throws MessagingException
Throws:
MessagingException

isMimeType

boolean isMimeType(String mimeType)
                   throws MessagingException
Throws:
MessagingException

removeHeader

void removeHeader(String name)
                  throws MessagingException
Throws:
MessagingException

setContent

void setContent(Multipart content)
                throws MessagingException
Throws:
MessagingException

setContent

void setContent(Object content,
                String type)
                throws MessagingException
Throws:
MessagingException

setDataHandler

void setDataHandler(DataHandler handler)
                    throws MessagingException
Throws:
MessagingException

setDescription

void setDescription(String description)
                    throws MessagingException
Throws:
MessagingException

setDisposition

void setDisposition(String disposition)
                    throws MessagingException
Throws:
MessagingException

setFileName

void setFileName(String name)
                 throws MessagingException
Throws:
MessagingException

setHeader

void setHeader(String name,
               String value)
               throws MessagingException
Throws:
MessagingException

setText

void setText(String content)
             throws MessagingException
Throws:
MessagingException

writeTo

void writeTo(OutputStream out)
             throws IOException,
                    MessagingException
Throws:
IOException
MessagingException


Copyright © 2006 Apache Software Foundation. All Rights Reserved.