Package org.digidoc4j.impl.asic.manifest
Class AsicManifest
java.lang.Object
org.digidoc4j.impl.asic.manifest.AsicManifest
Represents the META-INF/manifest.xml sub-document
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of ASiC manifest without specifying container type (the root file entry mimetype defaults toMimeTypeEnum.ASICE
).AsicManifest
(String containerType) Creates an instance of ASiC manifest with the specified container type. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFileEntries
(Collection<DataFile> dataFiles) Adds a list of file entries, representing the specified data files, into this manifest file.void
addFileEntry
(Collection<DataFile> dataFiles) Deprecated.void
addFileEntry
(DataFile dataFile) Adds a new file entry, representing the specified data file, into this manifest file.byte[]
getBytes()
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.
-
Field Details
-
XML_PATH
- See Also:
-
-
Constructor Details
-
AsicManifest
public AsicManifest()Creates an instance of ASiC manifest without specifying container type (the root file entry mimetype defaults toMimeTypeEnum.ASICE
). -
AsicManifest
Creates an instance of ASiC manifest with the specified container type. Container typeConstant.ASICS_CONTAINER_TYPE
sets the root file entry mimetype asMimeTypeEnum.ASICS
, any other value makes the root file entry mimetype to default toMimeTypeEnum.ASICE
.- Parameters:
containerType
- the container type
-
-
Method Details
-
addFileEntry
Deprecated.UseaddFileEntries(Collection)
instead.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
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
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
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
-
addFileEntries(Collection)
instead.