Package eu.europa.esig.dss.ws.dto
Class RemoteDocument
java.lang.Object
eu.europa.esig.dss.ws.dto.RemoteDocument
- All Implemented Interfaces:
Serializable
This class is used to transport a DSSDocument with SOAP and/or REST
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionEmpty constructorRemoteDocument(byte[] bytes, DigestAlgorithm digestAlgorithm, String name) This constructor allows to create an instance of RemoteDocument with a digest documentRemoteDocument(byte[] bytes, String name) This constructor allows to create a new instance of RemoteDocument with the whole document -
Method Summary
Modifier and TypeMethodDescriptionbooleanbyte[]getBytes()Returns the array of bytes representing the document or its digest value (for DigestDocument).Returns the current used digest algorithm for a DigestDocumentgetName()Gets the document nameinthashCode()voidsetBytes(byte[] bytes) Sets binaries of the document or its digest value (for DigestDocument).voidsetDigestAlgorithm(DigestAlgorithm digestAlgorithm) Sets the usedDigestAlgorithmfor a DigestDocumentvoidSets the document nametoString()
-
Constructor Details
-
RemoteDocument
public RemoteDocument()Empty constructor -
RemoteDocument
This constructor allows to create a new instance of RemoteDocument with the whole document- Parameters:
bytes- the full document binariesname-Stringthe document name
-
RemoteDocument
This constructor allows to create an instance of RemoteDocument with a digest document- Parameters:
bytes- the result of the digestdigestAlgorithm-DigestAlgorithmthe used digest algorithmname-Stringthe document name
-
-
Method Details
-
getBytes
public byte[] getBytes()Returns the array of bytes representing the document or its digest value (for DigestDocument).- Returns:
- array of
byte
-
setBytes
public void setBytes(byte[] bytes) Sets binaries of the document or its digest value (for DigestDocument).- Parameters:
bytes- binaries of the document or its digest value (for DigestDocument)
-
getDigestAlgorithm
Returns the current used digest algorithm for a DigestDocument- Returns:
DigestAlgorithm
-
setDigestAlgorithm
Sets the usedDigestAlgorithmfor a DigestDocument- Parameters:
digestAlgorithm-DigestAlgorithm
-
getName
Gets the document name- Returns:
String
-
setName
Sets the document name- Parameters:
name-String
-
hashCode
public int hashCode() -
equals
-
toString
-