@ConsumerType public interface ZipAttachmentProvider
InventoryPrinter
.
If a inventory printer implements this interface, the printer
can add additional attachments to the output of the
configuration ZIP.
A service implementing this method must register itself as a
InventoryPrinter
but not as a ZipAttachmentProvider
service.
When writing output to a ZIP file, this method is called if the
InventoryPrinter
service implements this interface.
Modifier and Type | Method and Description |
---|---|
void |
addAttachments(java.util.zip.ZipOutputStream zos,
java.lang.String namePrefix)
Add attachments to the zip output stream.
|
void addAttachments(java.util.zip.ZipOutputStream zos, java.lang.String namePrefix) throws java.io.IOException
The general pattern is to do for each entry to be added:
namePrefix
and a name
unique to the attachement provider, e.g. namePrefix + "att1.txt"
.
zos
.zos
.zos
- The zip output stream.namePrefix
- Name prefix to use for zip entries. Ends with a slash.java.io.IOException
- If an error occurrs writing the ZIP entry. This may
also be caused by reading some file system file to be added
to the ZIP file.Copyright © 2010 - 2020 Adobe. All Rights Reserved