Class AsicManifest

java.lang.Object
org.digidoc4j.impl.asic.manifest.AsicManifest

public class AsicManifest extends Object
Represents the META-INF/manifest.xml sub-document
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of ASiC manifest without specifying container type (the root file entry mimetype defaults to MimeTypeEnum.ASICE).
    AsicManifest(String containerType)
    Creates an instance of ASiC manifest with the specified container type.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Adds a list of file entries, representing the specified data files, into this manifest file.
    void
    Deprecated.
    void
    Adds a new file entry, representing the specified data file, into this manifest file.
    byte[]
    Returns the bytes of the current state of this manifest file.
    void
    writeTo(OutputStream outputStream)
    Writes the bytes of the current state of this manifest file into the specified output stream.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • AsicManifest

      public AsicManifest()
      Creates an instance of ASiC manifest without specifying container type (the root file entry mimetype defaults to MimeTypeEnum.ASICE).
    • AsicManifest

      public AsicManifest(String containerType)
      Creates an instance of ASiC manifest with the specified container type. Container type Constant.ASICS_CONTAINER_TYPE sets the root file entry mimetype as MimeTypeEnum.ASICS, any other value makes the root file entry mimetype to default to MimeTypeEnum.ASICE.
      Parameters:
      containerType - the container type
  • Method Details

    • addFileEntry

      @Deprecated public void addFileEntry(Collection<DataFile> dataFiles)
      Deprecated.
      Adds a list of file entries, representing the specified data files, into this manifest file.
      Parameters:
      dataFiles - the list of data files to add file entries for
    • addFileEntries

      public void addFileEntries(Collection<DataFile> dataFiles)
      Adds a list of file entries, representing the specified data files, into this manifest file.
      Parameters:
      dataFiles - the list of data files to add file entries for
    • addFileEntry

      public void addFileEntry(DataFile dataFile)
      Adds a new file entry, representing the specified data file, into this manifest file.
      Parameters:
      dataFile - the data file to add a new file entry for
    • getBytes

      public byte[] getBytes()
      Returns the bytes of the current state of this manifest file.
      Returns:
      the bytes of the current state of this manifest file
    • writeTo

      public void writeTo(OutputStream outputStream)
      Writes the bytes of the current state of this manifest file into the specified output stream.
      Parameters:
      outputStream - the output stream to write the bytes of this manifest files into