public class SMimeBodyPart
extends jakarta.mail.internet.MimeBodyPart
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.
| Constructor and Description |
|---|
SMimeBodyPart()
Creates a new SMimeBodyPart.
|
SMimeBodyPart(jakarta.activation.DataHandler dataHandler,
JMailSMimeSigned signed)
Creates a new SMimeBodyPart from a DataHandler and a JMailSMimeSigned.
|
SMimeBodyPart(jakarta.mail.internet.InternetHeaders headers,
byte[] content)
Creates a new SMimeBodyPart from given header and content bytes.
|
| Modifier and Type | Method and Description |
|---|---|
void |
writeTo(java.io.OutputStream os)
Writes the body part as an RFC 822 formatted stream and calculates a message
digest over the data.
|
addHeader, addHeaderLine, attachFile, attachFile, attachFile, attachFile, 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, saveFile, saveFile, setContent, setContent, setContentID, setContentLanguage, setContentMD5, setDataHandler, setDescription, setDescription, setDisposition, setFileName, setHeader, setText, setText, setText, updateHeaderspublic SMimeBodyPart()
public SMimeBodyPart(jakarta.mail.internet.InternetHeaders headers,
byte[] content)
throws jakarta.mail.MessagingException
headers - the headerscontent - bytes representing the body of this part.jakarta.mail.MessagingException - if an error occurs when creating
this body partpublic SMimeBodyPart(jakarta.activation.DataHandler dataHandler,
JMailSMimeSigned signed)
SignedContent for
initializing the application/pkcs7-signature body part.dataHandler - a DataHandler holding the content of this MimeBodyPartsigned - the JMailSMimeSigned object where the digest shall be set after
the content has been written to the output streampublic void writeTo(java.io.OutputStream os)
throws java.io.IOException,
jakarta.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 jakarta.mail.PartwriteTo in class jakarta.mail.internet.MimeBodyPartos - the output stream where the content shall be written tojava.io.IOException - if an error occurs while writing to the streamjakarta.mail.MessagingException - if an mail related error occurs