|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.mail.Multipart javax.mail.internet.MimeMultipart iaik.smime.SMimeMultipart
public class SMimeMultipart
Extends the MimeMultipart class of the javax.mail.internet package.
This class shall used when creating a multipart object to be send within a
multipart/signed message. When using the parent MimeMultipart
class no canonicalization is performed.
Field Summary |
---|
Fields inherited from class javax.mail.internet.MimeMultipart |
---|
ds, parsed |
Fields inherited from class javax.mail.Multipart |
---|
contentType, parent, parts |
Constructor Summary | |
---|---|
SMimeMultipart()
Default constructor. |
|
SMimeMultipart(javax.activation.DataSource ds)
Creates a new MimeMultipart and its bodyparts from the given DataSource. |
|
SMimeMultipart(java.lang.String subtype)
Creates a new MimeMultipart for the given subtype. |
Method Summary | |
---|---|
void |
addBodyPart(javax.mail.BodyPart part)
Adds a body part. |
void |
addBodyPart(javax.mail.BodyPart part,
int index)
Inserts a body part at the given index. |
void |
checkForSMimeParts(boolean checkForSMimeParts)
Turns on/off control to use SMimeBodyParts insteadof MimeBodyParts when adding a bodypart to this multipart. |
protected void |
updateHeaders()
Updates the headers of all included body parts. |
Methods inherited from class javax.mail.internet.MimeMultipart |
---|
createInternetHeaders, createMimeBodyPart, createMimeBodyPart, getBodyPart, getBodyPart, getCount, parse, setSubType, writeTo |
Methods inherited from class javax.mail.Multipart |
---|
getContentType, getParent, removeBodyPart, removeBodyPart, setMultipartDataSource, setParent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SMimeMultipart()
public SMimeMultipart(javax.activation.DataSource ds) throws javax.mail.MessagingException
Only calls the corresponding constructor of the MimeMultipart
super class.
ds
- the DataSource from which to create the MimeMultipart
javax.mail.MessagingException
- if an error occurs when creating the MimeMultipartpublic SMimeMultipart(java.lang.String subtype)
Only calls the corresponding constructor of the MimeMultipart
super class.
subtype
- the Mime subtypeMethod Detail |
---|
protected void updateHeaders() throws javax.mail.MessagingException
The SignedContent
class
must have access to this protected method. And that is the reason
for extending the javax.mail.internet.MimeMultipart
class.
updateHeaders
in class javax.mail.internet.MimeMultipart
javax.mail.MessagingException
- if an error occurs during the updating processpublic void addBodyPart(javax.mail.BodyPart part) throws javax.mail.MessagingException
addBodyPart
in class javax.mail.Multipart
part
- the body part to be added
javax.mail.MessagingException
- if an error occurs when adding the body part (e.g.
the supplied bodypart is no SMimeBodyPart
in the case of SMimePart control
is enabledpublic void addBodyPart(javax.mail.BodyPart part, int index) throws javax.mail.MessagingException
addBodyPart
in class javax.mail.Multipart
part
- the body part to be insertedindex
- the index where the body part shall be inserted
javax.mail.MessagingException
- if an error occurs when adding the body part (e.g.
the supplied body part is no SMimeBodyPart
in the case of SMimePart control
is enabledpublic void checkForSMimeParts(boolean checkForSMimeParts)
adding
a bodypart to this multipart.
Especially when creating a signed message of type multipart/signed ("clear-signed")
care has to be taken to properly canonicalize -- in particular text -- messages to give
the same unique representation on the sender side where the signature is created and on the
recipient side where the signature is verified.
SMimeBodyPart
objects rather than using plain
MimeBodyParts. When building a multipart entity from several body parts, the SMimeBodyParts
have to be inserted into a SMimeMultipart
object instead
of using a plain MimeMultipart.
SignedContent
, SMimeMultipart
and/or
SMimeBodyPart
object or generally
disable
the SMimeBodyPart check
throughout the whole application environment.
When choosing the latter option by calling
SMimeParameters.setCheckForSMimeParts(false);take care to continue to use SMimeBodyParts and SMimeMultiparts when signing a newly created yet not canoinicalized content.
checkForSMimeParts
- whether to turn on/off SMimePart checking
|
This Javadoc may contain text parts from text parts from IETF Internet Standard specifications (see copyright note). | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |