Class DocumentWithSha2
java.lang.Object
eu.europa.esig.dss.tsl.sha2.DocumentWithSha2
- All Implemented Interfaces:
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 -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDocumentWithSha2(eu.europa.esig.dss.model.DSSDocument document, eu.europa.esig.dss.model.DSSDocument sha2Document) Default constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddErrorMessage(String errorMessage) This method adds an error message occurred during the .sha2 file validationbooleaneu.europa.esig.dss.model.DigestgetDigest(eu.europa.esig.dss.enumerations.DigestAlgorithm arg0) byte[]getDigestValue(eu.europa.esig.dss.enumerations.DigestAlgorithm arg0) eu.europa.esig.dss.model.DSSDocumentGets the original documentReturns a list of errors occurred during processing of .sha2 document.eu.europa.esig.dss.enumerations.MimeTypegetName()eu.europa.esig.dss.model.DSSDocumentGets the downloaded sha2 document corresponding to thedocumentinthashCode()voidvoidsetMimeType(eu.europa.esig.dss.enumerations.MimeType arg0) voidtoString()voidwriteTo(OutputStream arg0)
-
Field Details
-
digestMap
-
mimeType
protected eu.europa.esig.dss.enumerations.MimeType mimeType -
name
-
-
Constructor Details
-
DocumentWithSha2
protected DocumentWithSha2(eu.europa.esig.dss.model.DSSDocument document, eu.europa.esig.dss.model.DSSDocument sha2Document) Default constructor- Parameters:
document-DSSDocumentoriginal downloaded documentsha2Document-DSSDocumentcorresponding sha2 document, containing digests of thedocument
-
-
Method Details
-
getDocument
public eu.europa.esig.dss.model.DSSDocument getDocument()Gets the original document- Returns:
DSSDocument
-
getSha2Document
public eu.europa.esig.dss.model.DSSDocument getSha2Document()Gets the downloaded sha2 document corresponding to thedocument- Returns:
DSSDocument
-
addErrorMessage
-
getErrors
-
openStream
-
equals
-
hashCode
public int hashCode() -
save
- Throws:
IOException
-
writeTo
- Throws:
IOException
-
getMimeType
public eu.europa.esig.dss.enumerations.MimeType getMimeType() -
setMimeType
public void setMimeType(eu.europa.esig.dss.enumerations.MimeType arg0) -
getName
-
setName
-
getDigest
public eu.europa.esig.dss.model.Digest getDigest(eu.europa.esig.dss.enumerations.DigestAlgorithm arg0) -
getDigestValue
public byte[] getDigestValue(eu.europa.esig.dss.enumerations.DigestAlgorithm arg0) -
toString
-