Class CMSSignedContentDocument

java.lang.Object
eu.europa.esig.dss.model.CommonDocument
eu.europa.esig.dss.cms.stream.CMSSignedContentDocument
All Implemented Interfaces:
eu.europa.esig.dss.model.DSSDocument, Serializable

public class CMSSignedContentDocument extends eu.europa.esig.dss.model.CommonDocument
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

    Constructors
    Constructor
    Description
    CMSSignedContentDocument(eu.europa.esig.dss.model.DSSDocument cmsDocument)
    Constructor with a null signed content type
    CMSSignedContentDocument(eu.europa.esig.dss.model.DSSDocument cmsDocument, org.bouncycastle.asn1.ASN1ObjectIdentifier signedContentType)
    Constructor with a provided signed content type
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addDigest(eu.europa.esig.dss.model.Digest digest)
    This method allows to add a Digest with a new digest algorithm to the current DigestDocument.
    boolean
     
    int
     
     
    void
    save(String filePath)
     
    org.bouncycastle.cms.CMSTypedData
    Returns a CMSTypedData for a signature creation

    Methods inherited from class eu.europa.esig.dss.model.CommonDocument

    getDigest, getDigestValue, getMimeType, getName, setMimeType, setName, toString, writeTo

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • CMSSignedContentDocument

      public CMSSignedContentDocument(eu.europa.esig.dss.model.DSSDocument cmsDocument)
      Constructor with a null signed content type
      Parameters:
      cmsDocument - DSSDocument representing the CMS document
    • CMSSignedContentDocument

      public CMSSignedContentDocument(eu.europa.esig.dss.model.DSSDocument cmsDocument, org.bouncycastle.asn1.ASN1ObjectIdentifier signedContentType)
      Constructor with a provided signed content type
      Parameters:
      cmsDocument - DSSDocument representing the CMS document
      signedContentType - ASN1ObjectIdentifier
  • Method Details

    • openStream

      public InputStream openStream()
    • toCMSTypedData

      public org.bouncycastle.cms.CMSTypedData toCMSTypedData()
      Returns a CMSTypedData for a signature creation
      Returns:
      CMSTypedData
    • addDigest

      public void addDigest(eu.europa.esig.dss.model.Digest digest)
      This method allows to add a Digest with a new digest algorithm to the current DigestDocument. Overwrites the previous digest if the same DigestAlgorithm is provided.
      Parameters:
      digest - Digest for the current document
    • save

      public void save(String filePath) throws IOException
      Specified by:
      save in interface eu.europa.esig.dss.model.DSSDocument
      Overrides:
      save in class eu.europa.esig.dss.model.CommonDocument
      Throws:
      IOException
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class eu.europa.esig.dss.model.CommonDocument
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class eu.europa.esig.dss.model.CommonDocument