Class ContainerEntryDocument

java.lang.Object
eu.europa.esig.dss.asic.common.ContainerEntryDocument
All Implemented Interfaces:
DSSZipEntryDocument, Serializable

public class ContainerEntryDocument extends Object implements DSSZipEntryDocument
Represents an entry within a ZIP archive, containing its metadata and file's content. This class can be used to create a file entry to be incorporated within an ASiC container with customized ZipEntry metadata (e.g. creation time, compression method, etc.).
See Also:
  • Field Details

    • digestMap

      protected EnumMap<eu.europa.esig.dss.enumerations.DigestAlgorithm, byte[]> digestMap
    • mimeType

      protected eu.europa.esig.dss.enumerations.MimeType mimeType
    • name

      protected String name
  • Constructor Details

    • ContainerEntryDocument

      public ContainerEntryDocument(eu.europa.esig.dss.model.DSSDocument content)
      Default constructor
      Parameters:
      content - DSSDocument representing file's content
    • ContainerEntryDocument

      public ContainerEntryDocument(eu.europa.esig.dss.model.DSSDocument content, DSSZipEntry zipEntry)
      Constructor with provided DSSZipEntry
      Parameters:
      content - DSSDocument representing file's content
      zipEntry - DSSZipEntry containing metadata about the ZIP entry
  • Method Details

    • openStream

      public InputStream openStream()
    • setName

      public void setName(String name)
    • getZipEntry

      public DSSZipEntry getZipEntry()
      Description copied from interface: DSSZipEntryDocument
      Returns ZIP entry wrapper containing metadata about a file within a ZIP-container
      Specified by:
      getZipEntry in interface DSSZipEntryDocument
      Returns:
      DSSZipEntry
    • equals

      public boolean equals(Object o)
    • hashCode

      public int hashCode()
    • writeTo

      void writeTo(OutputStream arg0) throws IOException
      Throws:
      IOException
    • getName

      String getName()
    • getMimeType

      eu.europa.esig.dss.enumerations.MimeType getMimeType()
    • setMimeType

      void setMimeType(eu.europa.esig.dss.enumerations.MimeType arg0)
    • save

      void save(String arg0) throws IOException
      Throws:
      IOException
    • getDigest

      eu.europa.esig.dss.model.Digest getDigest(eu.europa.esig.dss.enumerations.DigestAlgorithm arg0)
    • getDigestValue

      byte[] getDigestValue(eu.europa.esig.dss.enumerations.DigestAlgorithm arg0)
    • save

      public void save(String arg0) throws IOException
      Throws:
      IOException
    • writeTo

      public void writeTo(OutputStream arg0) throws IOException
      Throws:
      IOException
    • getMimeType

      public eu.europa.esig.dss.enumerations.MimeType getMimeType()
    • setMimeType

      public void setMimeType(eu.europa.esig.dss.enumerations.MimeType arg0)
    • getName

      public String getName()
    • 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

      public String toString()
      Overrides:
      toString in class Object