public class SMimeBodyPart
extends javax.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(javax.activation.DataHandler dataHandler,
JMailSMimeSigned signed)
Creates a new SMimeBodyPart from a DataHandler and a JMailSMimeSigned.
|
SMimeBodyPart(javax.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, 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(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 partpublic SMimeBodyPart(javax.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,
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 tojava.io.IOException - if an error occurs while writing to the streamjavax.mail.MessagingException - if an mail related error occurs