Class CMSSignedDocument
java.lang.Object
eu.europa.esig.dss.model.CommonDocument
eu.europa.esig.dss.cades.signature.CMSSignedDocument
- All Implemented Interfaces:
DSSDocument
,Serializable
A document composed by a CMSSignedData
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.bouncycastle.cms.CMSSignedData
The CMSSignedData representing the documentFields inherited from class eu.europa.esig.dss.model.CommonDocument
base64EncodeDigestMap, mimeType, name
-
Constructor Summary
ConstructorDescriptionCMSSignedDocument
(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 TypeMethodDescriptionbyte[]
getBytes()
Returns the encoded binaries of the CMSSignedDataorg.bouncycastle.cms.CMSSignedData
GetsCMSSignedData
Opens aInputStream
on theDSSDocument
contents.void
writeTo
(OutputStream stream) Writes the content of the document to the provided OutputStreamMethods inherited from class eu.europa.esig.dss.model.CommonDocument
getDigest, 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
Description copied from interface:DSSDocument
Writes the content of the document to the provided OutputStream- Specified by:
writeTo
in interfaceDSSDocument
- Overrides:
writeTo
in classCommonDocument
- Parameters:
stream
- the output stream where to write- Throws:
IOException
- if any IO error happens
-