Class CMSSignedDocument

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

public class CMSSignedDocument extends CommonDocument
A document composed by a CMSSignedData
See Also:
  • 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()
      Description copied from interface: DSSDocument
      Opens a InputStream on the DSSDocument contents. The type of the InputStream depends on the type of the DSSDocument.
      Returns:
      an InputStream
    • 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
      Description copied from interface: DSSDocument
      Writes the content of the document to the provided OutputStream
      Specified by:
      writeTo in interface DSSDocument
      Overrides:
      writeTo in class CommonDocument
      Parameters:
      stream - the output stream where to write
      Throws:
      IOException - if any IO error happens