Package eu.europa.esig.dss.cms.stream
Class CMSSignedContentDocument
java.lang.Object
eu.europa.esig.dss.model.CommonDocument
eu.europa.esig.dss.cms.stream.CMSSignedContentDocument
- All Implemented Interfaces:
DSSDocument,Serializable
This class is used to extract a wrapped signed content from a CMS document.
The class allows providing digest in order to avoid reading the document.
- See Also:
-
Field Summary
Fields inherited from class eu.europa.esig.dss.model.CommonDocument
digestMap, mimeType, name -
Constructor Summary
ConstructorsConstructorDescriptionCMSSignedContentDocument(DSSDocument cmsDocument) Constructor with a null signed content typeCMSSignedContentDocument(DSSDocument cmsDocument, org.bouncycastle.asn1.ASN1ObjectIdentifier signedContentType) Constructor with a provided signed content type -
Method Summary
Modifier and TypeMethodDescriptionvoidThis method allows to add aDigestwith a new digest algorithm to the current DigestDocument.booleaninthashCode()Opens aInputStreamon theDSSDocumentcontents.voidSave the content of the DSSDocument to the file.org.bouncycastle.cms.CMSTypedDataReturns aCMSTypedDatafor a signature creationMethods inherited from class eu.europa.esig.dss.model.CommonDocument
getDigest, getDigestValue, getMimeType, getName, setMimeType, setName, toString, writeTo
-
Constructor Details
-
CMSSignedContentDocument
Constructor with a null signed content type- Parameters:
cmsDocument-DSSDocumentrepresenting the CMS document
-
CMSSignedContentDocument
public CMSSignedContentDocument(DSSDocument cmsDocument, org.bouncycastle.asn1.ASN1ObjectIdentifier signedContentType) Constructor with a provided signed content type- Parameters:
cmsDocument-DSSDocumentrepresenting the CMS documentsignedContentType-ASN1ObjectIdentifier
-
-
Method Details
-
openStream
Description copied from interface:DSSDocumentOpens aInputStreamon theDSSDocumentcontents. The type of theInputStreamdepends on the type of theDSSDocument.- Returns:
- an
InputStream
-
toCMSTypedData
public org.bouncycastle.cms.CMSTypedData toCMSTypedData()Returns aCMSTypedDatafor a signature creation- Returns:
CMSTypedData
-
addDigest
This method allows to add aDigestwith a new digest algorithm to the current DigestDocument. Overwrites the previous digest if the same DigestAlgorithm is provided.- Parameters:
digest-Digestfor the current document
-
save
Description copied from interface:DSSDocumentSave the content of the DSSDocument to the file.- Specified by:
savein interfaceDSSDocument- Overrides:
savein classCommonDocument- Parameters:
filePath- the path to the file to be created- Throws:
IOException- if any IO error happens
-
equals
- Overrides:
equalsin classCommonDocument
-
hashCode
public int hashCode()- Overrides:
hashCodein classCommonDocument
-