SMIMEEnvelopedParserpublic class SMIMEEnvelopedParser extends org.bouncycastle.cms.CMSEnvelopedDataParser Stream based containing class for an S/MIME pkcs7-mime encrypted MimePart. |
Fields Summary |
---|
private final MimePart | message |
Constructors Summary |
---|
public SMIMEEnvelopedParser(MimeBodyPart message)
this(message, 0);
| public SMIMEEnvelopedParser(MimeMessage message)
this(message, 0);
| public SMIMEEnvelopedParser(MimeBodyPart message, int bufferSize)Create a parser from a MimeBodyPart using the passed in buffer size
for reading it.
super(getInputStream(message, bufferSize));
this.message = message;
| public SMIMEEnvelopedParser(MimeMessage message, int bufferSize)Create a parser from a MimeMessage using the passed in buffer size
for reading it.
super(getInputStream(message, bufferSize));
this.message = message;
|
Methods Summary |
---|
public javax.mail.internet.MimePart | getEncryptedContent()
return message;
| private static java.io.InputStream | getInputStream(javax.mail.Part bodyPart, int bufferSize)
try
{
InputStream in = bodyPart.getInputStream();
if (bufferSize == 0)
{
return new BufferedInputStream(in);
}
else
{
return new BufferedInputStream(in, bufferSize);
}
}
catch (IOException e)
{
throw new MessagingException("can't extract input stream: " + e);
}
|
|