Class DssDocumentWrapper

java.lang.Object
org.digidoc4j.impl.asic.cades.DssDocumentWrapper
All Implemented Interfaces:
eu.europa.esig.dss.model.DSSDocument, Serializable

public class DssDocumentWrapper extends Object implements eu.europa.esig.dss.model.DSSDocument
A wrapper for DSSDocuments for capturing document name and mimetype updates, and for shielding the wrapped document from those changes.
See Also:
  • Constructor Details

    • DssDocumentWrapper

      public DssDocumentWrapper(eu.europa.esig.dss.model.DSSDocument document)
  • Method Details

    • getWrappedDocument

      public eu.europa.esig.dss.model.DSSDocument getWrappedDocument()
    • openStream

      public InputStream openStream()
      Specified by:
      openStream in interface eu.europa.esig.dss.model.DSSDocument
    • writeTo

      public void writeTo(OutputStream stream) throws IOException
      Specified by:
      writeTo in interface eu.europa.esig.dss.model.DSSDocument
      Throws:
      IOException
    • getName

      public String getName()
      Specified by:
      getName in interface eu.europa.esig.dss.model.DSSDocument
    • setName

      public void setName(String name)
      Specified by:
      setName in interface eu.europa.esig.dss.model.DSSDocument
    • isNameUpdated

      public boolean isNameUpdated()
    • getMimeType

      public eu.europa.esig.dss.enumerations.MimeType getMimeType()
      Specified by:
      getMimeType in interface eu.europa.esig.dss.model.DSSDocument
    • setMimeType

      public void setMimeType(eu.europa.esig.dss.enumerations.MimeType mimeType)
      Specified by:
      setMimeType in interface eu.europa.esig.dss.model.DSSDocument
    • isMimeTypeUpdated

      public boolean isMimeTypeUpdated()
    • save

      public void save(String filePath) throws IOException
      Specified by:
      save in interface eu.europa.esig.dss.model.DSSDocument
      Throws:
      IOException
    • getDigest

      public eu.europa.esig.dss.model.Digest getDigest(eu.europa.esig.dss.enumerations.DigestAlgorithm digestAlgorithm)
      Specified by:
      getDigest in interface eu.europa.esig.dss.model.DSSDocument
    • getDigestValue

      public byte[] getDigestValue(eu.europa.esig.dss.enumerations.DigestAlgorithm digestAlgorithm)
      Specified by:
      getDigestValue in interface eu.europa.esig.dss.model.DSSDocument