public class AttachmentZipEntryStreamConsumer extends Object implements InputStreamConsumer<com.atlassian.fugue.Unit>
InputStreamConsumer. It will consume inputStream, which have
to provide valid zipStream data and stream content of entry with specified index to provided outputStream.| Constructor and Description |
|---|
AttachmentZipEntryStreamConsumer(OutputStream outputStream,
Consumer<org.apache.commons.compress.archivers.zip.ZipArchiveEntry> onZipEntryExists,
int entryIndex)
Constructing
AttachmentZipEntryStreamConsumer |
| Modifier and Type | Method and Description |
|---|---|
com.atlassian.fugue.Unit |
withInputStream(InputStream inputStream)
This method will consume inputStream, which have to provide valid zipStream data and stream content of entry with
specified index to provided outputStream.
|
public AttachmentZipEntryStreamConsumer(OutputStream outputStream, Consumer<org.apache.commons.compress.archivers.zip.ZipArchiveEntry> onZipEntryExists, int entryIndex)
AttachmentZipEntryStreamConsumeroutputStream - outputStream where content of zipEntry will be streamedonZipEntryExists - consumer which will get called before any data will get streamed into outputStreamentryIndex - index of zip entry which content will get streamed to outputStream, counting from 0public com.atlassian.fugue.Unit withInputStream(InputStream inputStream) throws IOException, ZipEntryNotFoundException
Consumer onZipEntryExists method will get called
before any bytes gets written to outputStream.withInputStream in interface InputStreamConsumer<com.atlassian.fugue.Unit>inputStream - has to provide valid zipStream bytesUnitZipEntryNotFoundException - when entry with given index was not foundIOExceptionCopyright © 2002-2018 Atlassian. All Rights Reserved.