Module jpms_dss_cms

Class CMSSignedDocument

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

public class CMSSignedDocument extends eu.europa.esig.dss.model.CommonDocument
A document composed by a CMSSignedData
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.bouncycastle.cms.CMSSignedData
    The CMSSignedData representing the document

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

    digestMap, mimeType, name
  • Constructor Summary

    Constructors
    Constructor
    Description
    CMSSignedDocument(org.bouncycastle.cms.CMSSignedData data)
    The default constructor for CMSSignedDocument.
    CMSSignedDocument(org.bouncycastle.cms.CMSSignedData data, String name)
    The constructor for CMSSignedDocument with a custom document name
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    byte[]
    Returns the encoded binaries of the CMSSignedData
    org.bouncycastle.cms.CMSSignedData
    Gets CMSSignedData
    int
     
     
    void
    This method writes a content of the CMS into an OutputStream using the DL coding

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

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

    Methods inherited from class java.lang.Object

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

    • signedData

      protected org.bouncycastle.cms.CMSSignedData signedData
      The CMSSignedData representing the document
  • 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
      Specified by:
      writeTo in interface eu.europa.esig.dss.model.DSSDocument
      Overrides:
      writeTo in class eu.europa.esig.dss.model.CommonDocument
      Parameters:
      stream - the output stream where to write
      Throws:
      IOException - if an error occurs on writing
    • 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