org.bouncycastle.mail.smime

Class SMIMECompressedGenerator


public class SMIMECompressedGenerator
extends SMIMEGenerator

General class for generating a pkcs7-mime compressed message. A simple example of usage.
      SMIMECompressedGenerator  fact = new SMIMECompressedGenerator();

      MimeBodyPart           smime = fact.generate(content, algorithm);
 
Note: Most clients expect the MimeBodyPart to be in a MimeMultipart when it's sent.

Field Summary

static String
ZLIB

Fields inherited from class org.bouncycastle.mail.smime.SMIMEGenerator

encoding, useBase64

Method Summary

MimeBodyPart
generate(MimeBodyPart content, String compressionOID)
generate an compressed object that contains an SMIME Compressed object using the given provider from the contents of the passed in message
MimeBodyPart
generate(MimeMessage message, String compressionOID)
generate an compressed object that contains an SMIME Compressed object using the given provider from the contents of the passed in message

Methods inherited from class org.bouncycastle.mail.smime.SMIMEGenerator

createSymmetricKeyGenerator, makeContentBodyPart, makeContentBodyPart, setContentTransferEncoding

Field Details

ZLIB

public static final String ZLIB

Method Details

generate

public MimeBodyPart generate(MimeBodyPart content,
                             String compressionOID)
            throws SMIMEException
generate an compressed object that contains an SMIME Compressed object using the given provider from the contents of the passed in message

generate

public MimeBodyPart generate(MimeMessage message,
                             String compressionOID)
            throws SMIMEException
generate an compressed object that contains an SMIME Compressed object using the given provider from the contents of the passed in message