public class CMSDigestedDataOutputConnector extends java.lang.Object implements CMSOutputConnector
CMSDigestedDataOutputConnector is used in place of a CMSDigestedDataOutputStream when
constructing nested CMS objects containing digested-data structures.
A CMSDigestedDataOutputConnector is essentially an output stream filter that wraps the data
written to it within a CMS digested-data structure. Only the Content field of the
CMS ContentInfo structure minus the the explicit [0] tag wrapper is written to the underlying output stream.
CMSOutputConnector,
CMSDigestedDataOutputStream| Constructor and Description |
|---|
CMSDigestedDataOutputConnector(CMSOutputConnector conn,
AlgorithmIdentifier digestAlgID,
ASN1ObjectID contentType,
boolean writeEContentInfo)
Creates a
CMSDigestedDataOutputConnector. |
CMSDigestedDataOutputConnector(java.io.OutputStream out,
AlgorithmIdentifier digestAlgID,
ASN1ObjectID contentType,
boolean writeEContentInfo)
Creates a
CMSDigestedDataOutputConnector. |
| Modifier and Type | Method and Description |
|---|---|
ASN1ObjectID |
getExposedContentType()
Returns the content type of the data that is output to the underlying output stream.
|
java.io.OutputStream |
getOutputStream()
Returns the output stream that is governed by this connector.
|
public CMSDigestedDataOutputConnector(java.io.OutputStream out,
AlgorithmIdentifier digestAlgID,
ASN1ObjectID contentType,
boolean writeEContentInfo)
throws java.security.NoSuchAlgorithmException
CMSDigestedDataOutputConnector.
Note the change in the exceptions thrown
Exceptions no longer thrown : AlgorithmIdentifierException
Exceptions introduced : NoSuchAlgorithmException
out - The underlying output stream.digestAlgID - The digest algorithm identifier.contentType - The content type of the enclosing content.writeEContentInfo - true if the enclosed content must be written to the
output stream; false otherwise.java.security.NoSuchAlgorithmException - Digest algorithm is not supported.public CMSDigestedDataOutputConnector(CMSOutputConnector conn, AlgorithmIdentifier digestAlgID, ASN1ObjectID contentType, boolean writeEContentInfo) throws java.security.NoSuchAlgorithmException
CMSDigestedDataOutputConnector.
Note the change in the exceptions thrown
Exceptions no longer thrown : AlgorithmIdentifierException
Exceptions introduced : NoSuchAlgorithmException
conn - The underlying output connector.digestAlgID - The digest algorithm identifier.contentType - The content type of the enclosing content.writeEContentInfo - true if the enclosed content must be written to the
output stream; false otherwise.java.security.NoSuchAlgorithmException - Digest algorithm is not supported.public ASN1ObjectID getExposedContentType()
getExposedContentType in interface CMSOutputConnectorpublic java.io.OutputStream getOutputStream()
getOutputStream in interface CMSOutputConnector