Package eu.europa.esig.dss.cms
Class CMSSignedDocument
java.lang.Object
eu.europa.esig.dss.model.CommonDocument
eu.europa.esig.dss.cms.CMSSignedDocument
- All Implemented Interfaces:
DSSDocument
,Serializable
A document composed by a CMSSignedData
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.bouncycastle.cms.CMSSignedData
The CMSSignedData representing the documentFields inherited from class eu.europa.esig.dss.model.CommonDocument
digestMap, mimeType, name
-
Constructor Summary
ConstructorsConstructorDescriptionCMSSignedDocument
(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 TypeMethodDescriptionboolean
byte[]
getBytes()
Returns the encoded binaries of the CMSSignedDataorg.bouncycastle.cms.CMSSignedData
GetsCMSSignedData
int
hashCode()
Opens aInputStream
on theDSSDocument
contents.void
writeTo
(OutputStream stream) This method writes a content of the CMS into anOutputStream
using the DL codingMethods inherited from class eu.europa.esig.dss.model.CommonDocument
getDigest, getDigestValue, getMimeType, getName, save, setMimeType, setName, toString
-
Field Details
-
signedData
protected org.bouncycastle.cms.CMSSignedData signedDataThe CMSSignedData representing the document
-
-
Constructor Details
-
CMSSignedDocument
public CMSSignedDocument(org.bouncycastle.cms.CMSSignedData data) The default constructor for CMSSignedDocument.- Parameters:
data
- the CMSSignedData
-
CMSSignedDocument
The constructor for CMSSignedDocument with a custom document name- Parameters:
data
- the CMSSignedDataname
-String
document name
-
-
Method Details
-
openStream
Description copied from interface:DSSDocument
Opens aInputStream
on theDSSDocument
contents. The type of theInputStream
depends on the type of theDSSDocument
.- Returns:
- an
InputStream
-
getCMSSignedData
public org.bouncycastle.cms.CMSSignedData getCMSSignedData()GetsCMSSignedData
- Returns:
CMSSignedData
the signedData
-
getBytes
public byte[] getBytes()Returns the encoded binaries of the CMSSignedData- Returns:
- binaries
-
writeTo
This method writes a content of the CMS into anOutputStream
using the DL coding- Specified by:
writeTo
in interfaceDSSDocument
- Overrides:
writeTo
in classCommonDocument
- Parameters:
stream
- the output stream where to write- Throws:
IOException
- if an error occurs on writing
-
equals
- Overrides:
equals
in classCommonDocument
-
hashCode
public int hashCode()- Overrides:
hashCode
in classCommonDocument
-