|
IAIK CMS/SMIME Toolkit API Documentation
Version 6.1 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.mail.BodyPart
javax.mail.internet.MimeBodyPart
iaik.smime.SMimeBodyPart
public class SMimeBodyPart
This class extends the standard MimeBodyPart class of the javax.mail.internet package about MessageDigest calculation.
This class shall used when creating a body part to be sent within a multipart/signed
message. When using the parent MimeBodyPart class no canonicalization
is performed.
| Field Summary |
|---|
| Fields inherited from class javax.mail.internet.MimeBodyPart |
|---|
content, contentStream, dh, headers |
| Fields inherited from class javax.mail.BodyPart |
|---|
parent |
| Fields inherited from interface javax.mail.Part |
|---|
ATTACHMENT, INLINE |
| Constructor Summary | |
|---|---|
SMimeBodyPart()
Creates a new SMimeBodyPart. |
|
SMimeBodyPart(javax.mail.internet.InternetHeaders headers,
byte[] content)
Creates a new SMimeBodyPart from given header and content bytes. |
|
| Method Summary | |
|---|---|
void |
checkForSMimeParts(boolean checkForSMimeParts)
Turns on/off control to use SMimeMultiparts and SMimeBodyParts insteadof MimeMultipatrs and MimeBodyParts when supplying the content for this SMimeBodyPart. |
void |
setDataHandler(javax.activation.DataHandler dh)
Sets the content wrapped by a javax.activation.DataHandler. |
void |
writeTo(java.io.OutputStream os)
Writes the body part as an RFC 822 formatted stream and calculates a message digest over the data. |
| Methods inherited from class javax.mail.internet.MimeBodyPart |
|---|
addHeader, addHeaderLine, getAllHeaderLines, getAllHeaders, getContent, getContentID, getContentLanguage, getContentMD5, getContentStream, getContentType, getDataHandler, getDescription, getDisposition, getEncoding, getFileName, getHeader, getHeader, getInputStream, getLineCount, getMatchingHeaderLines, getMatchingHeaders, getNonMatchingHeaderLines, getNonMatchingHeaders, getRawInputStream, getSize, isMimeType, removeHeader, setContent, setContent, setContentLanguage, setContentMD5, setDescription, setDescription, setDisposition, setFileName, setHeader, setText, setText, updateHeaders |
| Methods inherited from class javax.mail.BodyPart |
|---|
getParent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SMimeBodyPart()
public SMimeBodyPart(javax.mail.internet.InternetHeaders headers,
byte[] content)
throws javax.mail.MessagingException
headers - the headerscontent - bytes representing the body of this part.
javax.mail.MessagingException - if an error occurs when creating
this body part| Method Detail |
|---|
public void checkForSMimeParts(boolean checkForSMimeParts)
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
public void setDataHandler(javax.activation.DataHandler dh)
throws javax.mail.MessagingException
javax.activation.DataHandler.
setDataHandler in interface javax.mail.PartsetDataHandler in class javax.mail.internet.MimeBodyPartdh - the dataHandler wrapping the content
javax.mail.MessagingException - if the content supplied by the DataHandler
cannot be accessed or the content represents
a Multipart but is not supplied as SMimeMultipart
(in the case of SMimePart control is enabled)
public void writeTo(java.io.OutputStream os)
throws java.io.IOException,
javax.mail.MessagingException
The message digest is set for the inherent JMailSMimeSigned object to be written as next part of the multipart/signed.
writeTo in interface javax.mail.PartwriteTo in class javax.mail.internet.MimeBodyPartos - the output stream where the content shall be written to
java.io.IOException - if an error occurs while writing to the stream
javax.mail.MessagingException - if an mail related error occurs
|
IAIK CMS/SMIME Toolkit API Documentation
Version 6.1 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
|
v6.1 (c) 2002 IAIK, (c) 2003 - 2025 SIC |
|