Package org.bouncycastle.mime.smime
Class SMIMESignedWriter.Builder
- java.lang.Object
-
- org.bouncycastle.mime.smime.SMIMESignedWriter.Builder
-
- Enclosing class:
- SMIMESignedWriter
public static class SMIMESignedWriter.Builder extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SMIMESignedWriter.Builder
addCertificate(X509CertificateHolder certificate)
SMIMESignedWriter.Builder
addCertificates(org.bouncycastle.util.Store certificates)
SMIMESignedWriter.Builder
addSignerInfoGenerator(SignerInfoGenerator signerGenerator)
Add a generator to produce the signer info required.SMIMESignedWriter
build(OutputStream mimeOut)
SMIMESignedWriter.Builder
withHeader(String headerName, String headerValue)
Specify a MIME header (name, value) pair for this builder.
-
-
-
Method Detail
-
withHeader
public SMIMESignedWriter.Builder withHeader(String headerName, String headerValue)
Specify a MIME header (name, value) pair for this builder. If the headerName already exists it will be overridden.- Parameters:
headerName
- name of the MIME header.headerValue
- value of the MIME header.- Returns:
- the current Builder instance.
-
addCertificate
public SMIMESignedWriter.Builder addCertificate(X509CertificateHolder certificate) throws CMSException
- Throws:
CMSException
-
addCertificates
public SMIMESignedWriter.Builder addCertificates(org.bouncycastle.util.Store certificates) throws CMSException
- Throws:
CMSException
-
addSignerInfoGenerator
public SMIMESignedWriter.Builder addSignerInfoGenerator(SignerInfoGenerator signerGenerator)
Add a generator to produce the signer info required.- Parameters:
signerGenerator
- a generator for a signer info object.- Returns:
- the current Builder instance.
-
build
public SMIMESignedWriter build(OutputStream mimeOut)
-
-