Package org.bouncycastle.mail.smime
Class SMIMEUtil
java.lang.Object
org.bouncycastle.mail.smime.SMIMEUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bouncycastle.asn1.cms.IssuerAndSerialNumberReturn a CMS IssuerAndSerialNumber structure for the passed in X.509 certificate.static booleanisMultipartContent(javax.mail.Part part) static javax.mail.internet.MimeBodyParttoMimeBodyPart(byte[] content) return the MimeBodyPart described in the raw bytes provided in contentstatic javax.mail.internet.MimeBodyParttoMimeBodyPart(InputStream content) return the MimeBodyPart described in the input stream contentstatic FileBackedMimeBodyParttoMimeBodyPart(org.bouncycastle.cms.CMSTypedStream content) return a file backed MimeBodyPart described inCMSTypedStreamcontent.static FileBackedMimeBodyParttoMimeBodyPart(org.bouncycastle.cms.CMSTypedStream content, File file) Return a file based MimeBodyPart represented by content and backed by the file represented by file.
-
Constructor Details
-
SMIMEUtil
public SMIMEUtil()
-
-
Method Details
-
isMultipartContent
public static boolean isMultipartContent(javax.mail.Part part) throws javax.mail.MessagingException - Throws:
javax.mail.MessagingException
-
toMimeBodyPart
return the MimeBodyPart described in the raw bytes provided in content- Throws:
SMIMEException
-
toMimeBodyPart
public static javax.mail.internet.MimeBodyPart toMimeBodyPart(InputStream content) throws SMIMEException return the MimeBodyPart described in the input stream content- Throws:
SMIMEException
-
toMimeBodyPart
public static FileBackedMimeBodyPart toMimeBodyPart(org.bouncycastle.cms.CMSTypedStream content) throws SMIMEException return a file backed MimeBodyPart described inCMSTypedStreamcontent.- Throws:
SMIMEException
-
toMimeBodyPart
public static FileBackedMimeBodyPart toMimeBodyPart(org.bouncycastle.cms.CMSTypedStream content, File file) throws SMIMEException Return a file based MimeBodyPart represented by content and backed by the file represented by file.- Parameters:
content- content stream containing body part.file- file to store the decoded body part in.- Returns:
- the decoded body part.
- Throws:
SMIMEException
-
createIssuerAndSerialNumberFor
public static org.bouncycastle.asn1.cms.IssuerAndSerialNumber createIssuerAndSerialNumberFor(X509Certificate cert) throws CertificateParsingException Return a CMS IssuerAndSerialNumber structure for the passed in X.509 certificate.- Parameters:
cert- the X.509 certificate to get the issuer and serial number for.- Returns:
- an IssuerAndSerialNumber structure representing the certificate.
- Throws:
CertificateParsingException
-