com.sun.mail.mbox
Class SunV3Multipart

java.lang.Object
  extended by javax.mail.Multipart
      extended by javax.mail.internet.MimeMultipart
          extended by com.sun.mail.mbox.SunV3Multipart

public class SunV3Multipart
extends javax.mail.internet.MimeMultipart

The SunV3Multipart class is an implementation of the abstract Multipart class that uses SunV3 conventions for the multipart data.


Field Summary
 
Fields inherited from class javax.mail.internet.MimeMultipart
ds, parsed
 
Fields inherited from class javax.mail.Multipart
contentType, parent, parts
 
Constructor Summary
SunV3Multipart(javax.activation.DataSource ds)
          Constructs a SunV3Multipart object and its bodyparts from the given DataSource.
 
Method Summary
 javax.mail.BodyPart getBodyPart(java.lang.String CID)
          Get the BodyPart referred to by the given ContentID (CID).
protected  void parse()
          Parse the InputStream from our DataSource, constructing the appropriate MimeBodyParts.
 void setSubType(java.lang.String subtype)
          Set the subtype.
protected  void updateHeaders()
          Update headers.
 void writeTo(java.io.OutputStream os)
          Iterates through all the parts and outputs each SunV3 part separated by a boundary.
 
Methods inherited from class javax.mail.internet.MimeMultipart
addBodyPart, addBodyPart, createInternetHeaders, createMimeBodyPart, createMimeBodyPart, getBodyPart, getCount, getPreamble, isComplete, removeBodyPart, removeBodyPart, setPreamble
 
Methods inherited from class javax.mail.Multipart
getContentType, getParent, setMultipartDataSource, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SunV3Multipart

public SunV3Multipart(javax.activation.DataSource ds)
               throws javax.mail.MessagingException
Constructs a SunV3Multipart object and its bodyparts from the given DataSource.

Parameters:
ds - DataSource, can be a MultipartDataSource
Throws:
javax.mail.MessagingException
Method Detail

setSubType

public void setSubType(java.lang.String subtype)
                throws javax.mail.MessagingException
Set the subtype. Throws MethodNotSupportedException.

Overrides:
setSubType in class javax.mail.internet.MimeMultipart
Parameters:
subtype - Subtype
Throws:
javax.mail.MessagingException

getBodyPart

public javax.mail.BodyPart getBodyPart(java.lang.String CID)
                                throws javax.mail.MessagingException
Get the BodyPart referred to by the given ContentID (CID). Throws MethodNotSupportException.

Overrides:
getBodyPart in class javax.mail.internet.MimeMultipart
Parameters:
CID - the ContentID of the desired part
Returns:
the Part
Throws:
javax.mail.MessagingException

updateHeaders

protected void updateHeaders()
                      throws javax.mail.MessagingException
Update headers. Throws MethodNotSupportException.

Overrides:
updateHeaders in class javax.mail.internet.MimeMultipart
Throws:
javax.mail.MessagingException

writeTo

public void writeTo(java.io.OutputStream os)
             throws java.io.IOException,
                    javax.mail.MessagingException
Iterates through all the parts and outputs each SunV3 part separated by a boundary.

Overrides:
writeTo in class javax.mail.internet.MimeMultipart
Throws:
java.io.IOException - if an IO related exception occurs
javax.mail.MessagingException

parse

protected void parse()
              throws javax.mail.MessagingException
Description copied from class: javax.mail.internet.MimeMultipart
Parse the InputStream from our DataSource, constructing the appropriate MimeBodyParts. The parsed flag is set to true, and if true on entry nothing is done. This method is called by all other methods that need data for the body parts, to make sure the data has been parsed.

Overrides:
parse in class javax.mail.internet.MimeMultipart
Throws:
javax.mail.MessagingException