Class CMSSignedDocument

java.lang.Object
eu.europa.esig.dss.cms.CMSSignedDocument
All Implemented Interfaces:
Serializable

public class CMSSignedDocument extends Object
A document composed by a CMSSignedData
See Also:
  • Field Details

    • signedData

      protected org.bouncycastle.cms.CMSSignedData signedData
      The CMSSignedData representing the document
    • digestMap

      protected EnumMap<eu.europa.esig.dss.enumerations.DigestAlgorithm, byte[]> digestMap
    • mimeType

      protected eu.europa.esig.dss.enumerations.MimeType mimeType
    • name

      protected String name
  • Constructor Details

    • CMSSignedDocument

      public CMSSignedDocument(org.bouncycastle.cms.CMSSignedData data)
      The default constructor for CMSSignedDocument.
      Parameters:
      data - the CMSSignedData
    • CMSSignedDocument

      public CMSSignedDocument(org.bouncycastle.cms.CMSSignedData data, String name)
      The constructor for CMSSignedDocument with a custom document name
      Parameters:
      data - the CMSSignedData
      name - String document name
  • Method Details

    • openStream

      public InputStream openStream()
    • getCMSSignedData

      public org.bouncycastle.cms.CMSSignedData getCMSSignedData()
      Gets CMSSignedData
      Returns:
      CMSSignedData the signedData
    • getBytes

      public byte[] getBytes()
      Returns the encoded binaries of the CMSSignedData
      Returns:
      binaries
    • writeTo

      public void writeTo(OutputStream stream) throws IOException
      This method writes a content of the CMS into an OutputStream using the DL coding
      Parameters:
      stream - the output stream where to write
      Throws:
      IOException - if an error occurs on writing
    • equals

      public boolean equals(Object o)
    • hashCode

      public int hashCode()
    • save

      public void save(String arg0) throws IOException
      Throws:
      IOException
    • getMimeType

      public eu.europa.esig.dss.enumerations.MimeType getMimeType()
    • setMimeType

      public void setMimeType(eu.europa.esig.dss.enumerations.MimeType arg0)
    • getName

      public String getName()
    • setName

      public void setName(String arg0)
    • getDigest

      public eu.europa.esig.dss.model.Digest getDigest(eu.europa.esig.dss.enumerations.DigestAlgorithm arg0)
    • getDigestValue

      public byte[] getDigestValue(eu.europa.esig.dss.enumerations.DigestAlgorithm arg0)
    • toString

      public String toString()
      Overrides:
      toString in class Object