public class SmimeCompressed extends java.lang.Object implements SmimeObject
Constructor and Description |
---|
SmimeCompressed(MimeBodyPart content)
Create a
SmimeCompressed . |
SmimeCompressed(MimeBodyPart content,
AlgorithmIdentifier contentCompressionAlgID)
Create a
SmimeCompressed . |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
generateContentType()
Returns the content type.
|
java.lang.String |
generateContentType(boolean useStandardContentTypes)
Returns the content type.
|
AlgorithmIdentifier |
getContentCompressionAlgID()
Returns the content compression algorithm.
|
MimeBodyPart |
getEnclosedBodyPart()
Returns the Decompressed Content.
|
void |
writeTo(java.io.OutputStream os,
java.lang.String mimeType)
Writes this
SmimeCompressed to the given output stream. |
public SmimeCompressed(MimeBodyPart content) throws MessagingException, java.io.IOException
SmimeCompressed
.content
- The message content.MessagingException
- An error occurred while setting the message content.java.io.IOException
- The content compression algorithm is not supported or the message content
is empty.public SmimeCompressed(MimeBodyPart content, AlgorithmIdentifier contentCompressionAlgID) throws MessagingException, java.io.IOException
SmimeCompressed
.content
- The message content.contentCompressionAlgID
- The content compression algorithm identifier.MessagingException
- An error occurred while setting the message content.java.io.IOException
- The content compression algorithm is not supported or the message content
is empty.public MimeBodyPart getEnclosedBodyPart() throws AlgorithmIdentifierException, InvalidInputException, MessagingException
AlgorithmIdentifierException
- The content compression algorithm is not supported.InvalidInputException
- The message content type is incorrect.MessagingException
- An error occurred while setting the decrypted content.public AlgorithmIdentifier getContentCompressionAlgID()
public java.lang.String generateContentType(boolean useStandardContentTypes)
generateContentType
in interface SmimeObject
useStandardContentTypes
- If true
the standard content type is generated;
If false
the experimental content type is generated.public java.lang.String generateContentType()
generateContentType
in interface SmimeObject
public void writeTo(java.io.OutputStream os, java.lang.String mimeType) throws java.io.IOException, MessagingException
SmimeCompressed
to the given output stream.
Relevant canonicalizations, such as transforming text line-breaks to
CRLF
, are applied.writeTo
in interface SmimeObject
os
- The output stream to which this SmimeCompressed
will be written.mimeType
- Ignored.java.io.IOException
- An I/O error occurred.MessagingException
- An error occurred while creating the smime message.