Package eu.europa.esig.dss.tsl.sha2
Class DocumentWithSha2
java.lang.Object
eu.europa.esig.dss.model.CommonDocument
eu.europa.esig.dss.tsl.sha2.DocumentWithSha2
- All Implemented Interfaces:
DSSDocument,Serializable
This class is used to represent a downloaded
eu.europa.esig.dss.model.DSSDocument
with its corresponding ".sha2" file- See Also:
-
Field Summary
Fields inherited from class eu.europa.esig.dss.model.CommonDocument
digestMap, mimeType, name -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDocumentWithSha2(DSSDocument document, DSSDocument sha2Document) Default constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddErrorMessage(String errorMessage) This method adds an error message occurred during the .sha2 file validationGets the original documentReturns a list of errors occurred during processing of .sha2 document.Gets the downloaded sha2 document corresponding to thedocumentOpens aInputStreamon theDSSDocumentcontents.Methods inherited from class eu.europa.esig.dss.model.CommonDocument
getDigest, getDigestValue, getMimeType, getName, save, setMimeType, setName, toString, writeTo
-
Constructor Details
-
DocumentWithSha2
Default constructor- Parameters:
document-DSSDocumentoriginal downloaded documentsha2Document-DSSDocumentcorresponding sha2 document, containing digests of thedocument
-
-
Method Details
-
getDocument
-
getSha2Document
Gets the downloaded sha2 document corresponding to thedocument- Returns:
DSSDocument
-
addErrorMessage
-
getErrors
-
openStream
Description copied from interface:DSSDocumentOpens aInputStreamon theDSSDocumentcontents. The type of theInputStreamdepends on the type of theDSSDocument.- Returns:
- an
InputStream
-