Class ZipStream
- java.lang.Object
-
- org.activiti.cloud.services.common.zip.ZipStream
-
public class ZipStream extends Object
Zip stream based on aZipInputStream
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classZipStream.ZipStreamEntry
-
Constructor Summary
Constructors Constructor Description ZipStream(InputStream inputStream)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidforEach(Consumer<ZipStream.ZipStreamEntry> consumer)Performs an action for each zip entry of this stream.static ZipStreamof(InputStream inputStream)Create thgZipStreamcorresponding to anInputStream.static ZipStreamof(org.springframework.web.multipart.MultipartFile multipartFile)Create thgZipStreamcorresponding to aMultipartFile.
-
-
-
Constructor Detail
-
ZipStream
public ZipStream(InputStream inputStream)
-
-
Method Detail
-
forEach
public void forEach(Consumer<ZipStream.ZipStreamEntry> consumer) throws IOException
Performs an action for each zip entry of this stream.- Parameters:
consumer- the action to perform on the zip entries- Throws:
IOException- in case of zip entry input stream access error
-
of
public static ZipStream of(org.springframework.web.multipart.MultipartFile multipartFile) throws IOException
Create thgZipStreamcorresponding to aMultipartFile.- Parameters:
multipartFile- the multipart file- Returns:
- the zip stream
- Throws:
IOException- in case of multipart file input stream access error
-
of
public static ZipStream of(InputStream inputStream) throws IOException
Create thgZipStreamcorresponding to anInputStream.- Parameters:
inputStream- the inputStream- Returns:
- the zip stream
- Throws:
IOException- in case of input stream access error
-
-