| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.mail.Multipart
public abstract class Multipart
A container for multiple BodyParts.
| Field Summary | |
|---|---|
protected  String | 
contentType
The content type of this multipart object; defaults to "multipart/mixed"  | 
protected  Part | 
parent
The Part that contains this multipart.  | 
protected  Vector | 
parts
Vector of sub-parts.  | 
| Constructor Summary | |
|---|---|
protected  | 
Multipart()
 | 
| Method Summary | |
|---|---|
 void | 
addBodyPart(BodyPart part)
Add a part to the end of the list.  | 
 void | 
addBodyPart(BodyPart part,
                       int pos)
Insert a part into the list at a designated point; all subsequent parts move down  | 
 BodyPart | 
getBodyPart(int index)
Get the specified part; numbering starts at zero.  | 
 String | 
getContentType()
Return the content type.  | 
 int | 
getCount()
Return the number of enclosed parts  | 
 Part | 
getParent()
Return the Part containing this Multipart object or null if unknown.  | 
 boolean | 
removeBodyPart(BodyPart part)
Remove the supplied part from the list.  | 
 void | 
removeBodyPart(int index)
Remove the specified part; all others move down one  | 
protected  void | 
setMultipartDataSource(MultipartDataSource mds)
Initialize this multipart object from the supplied data source.  | 
 void | 
setParent(Part part)
Set the parent of this Multipart object  | 
abstract  void | 
writeTo(OutputStream out)
Encode and write this multipart to the supplied OutputStream; the encoding used is determined by the implementation.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected Vector parts
protected String contentType
protected Part parent
| Constructor Detail | 
|---|
protected Multipart()
| Method Detail | 
|---|
protected void setMultipartDataSource(MultipartDataSource mds)
                               throws MessagingException
BodyParts into this object and initializes the content type.
mds - the data source
MessagingExceptionpublic String getContentType()
public int getCount()
             throws MessagingException
MessagingException
public BodyPart getBodyPart(int index)
                     throws MessagingException
index - the part to get
MessagingException
public boolean removeBodyPart(BodyPart part)
                       throws MessagingException
part - the part to remove
MessagingException
public void removeBodyPart(int index)
                    throws MessagingException
index - the part to remove
MessagingException
public void addBodyPart(BodyPart part)
                 throws MessagingException
part - the part to add
MessagingException
public void addBodyPart(BodyPart part,
                        int pos)
                 throws MessagingException
part - the part to addpos - the index of the new part
MessagingException
public abstract void writeTo(OutputStream out)
                      throws IOException,
                             MessagingException
out - the stream to write to
IOException
MessagingExceptionpublic Part getParent()
public void setParent(Part part)
part - this object's parent
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||