public class AttachmentZipEntryStreamConsumer extends Object implements InputStreamConsumer<io.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|
|Modifier and Type||Method and Description|
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)
outputStream- outputStream where content of zipEntry will be streamed
onZipEntryExists- consumer which will get called before any data will get streamed into outputStream
entryIndex- index of zip entry which content will get streamed to outputStream, counting from 0
public io.atlassian.fugue.Unit withInputStream(InputStream inputStream) throws IOException, ZipEntryNotFoundException
ConsumeronZipEntryExists method will get called before any bytes gets written to outputStream.
Copyright © 2002-2020 Atlassian. All Rights Reserved.