Class RemoteDocument

java.lang.Object
eu.europa.esig.dss.ws.dto.RemoteDocument
All Implemented Interfaces:
Serializable

public class RemoteDocument extends Object implements Serializable
This class is used to transport a DSSDocument with SOAP and/or REST
See Also:
  • Constructor Details

    • RemoteDocument

      public RemoteDocument()
      Empty constructor
    • RemoteDocument

      public RemoteDocument(byte[] bytes, String name)
      This constructor allows to create a new instance of RemoteDocument with the whole document
      Parameters:
      bytes - the full document binaries
      name - String the document name
    • RemoteDocument

      public RemoteDocument(byte[] bytes, DigestAlgorithm digestAlgorithm, String name)
      This constructor allows to create an instance of RemoteDocument with a digest document
      Parameters:
      bytes - the result of the digest
      digestAlgorithm - DigestAlgorithm the used digest algorithm
      name - String the 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

      public DigestAlgorithm getDigestAlgorithm()
      Returns the current used digest algorithm for a DigestDocument
      Returns:
      DigestAlgorithm
    • setDigestAlgorithm

      public void setDigestAlgorithm(DigestAlgorithm digestAlgorithm)
      Sets the used DigestAlgorithm for a DigestDocument
      Parameters:
      digestAlgorithm - DigestAlgorithm
    • getName

      public String getName()
      Gets the document name
      Returns:
      String
    • setName

      public void setName(String name)
      Sets the document name
      Parameters:
      name - String
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object