Package io.github.erdos.stencil.impl
Class ZipHelper
java.lang.Object
io.github.erdos.stencil.impl.ZipHelper
Various helpers for handling ZIP files.
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidunzipStreamIntoDirectory(InputStream zipFileStream, File unzipTargetDirectory) Unzips contents of a zip file under the target directory.
- 
Method Details- 
unzipStreamIntoDirectorypublic static void unzipStreamIntoDirectory(InputStream zipFileStream, File unzipTargetDirectory) throws IOException Unzips contents of a zip file under the target directory. Closes stream. The unzipped files keep their relative paths from the zip file. That is files from the root of the zip file will be put directly under target directory, etc.- Parameters:
- zipFileStream- input stream of a ZIP file
- unzipTargetDirectory- a directory where zip contents are put
- Throws:
- IllegalArgumentException- when any param is null.
- IllegalStateException- when target file already exists.
- IOException- on file system error
 
 
-