Skip to content
Advertisement

Tag: zip

Zip directory to multiple destinations using Gradle

Is it possible with Gradle’s Zip task to copy the resulting zip into multiple destinations? AFAIK you can only zip multiple input directories with only one output destination. Is there a way to zip a directory and copy the archive to multiple destinations (in one single task)? Since I’m bound to using Gradle v5.0, a solution for that version of

Unzip specific zip file from nested zip file using ANT

I have a zip file ex. ‘test.zip’ that contains 2 more zip files within it – A.zip and B.zip. I want to only extract contents of A.zip and leave B.zip untouched. I did try out the below code snippet, but found no luck yet – Please advise how this could be achieved. Answer From the unzip task’s documentation: Only file

how to decode Java stream in PHP

I requested Walmart report API and the result would be returned zip file stream.Refer to the API documents,it gives an example to realize it with Java code as the following below: However,if I use php like: It would download zip file but the file data is corrupt.It maybe such a reason like the byte stream is transfered by using Java

Create a large zip assembly with maven-assembly-plugin

I’m having a problem with creating a larger zip assembly (uncompressed takes over 3GB) using maven-assembly-plugin. The problem occurs when building the output zip file (compressed less than 1GB). Running maven with option -e gives me a more detailed info: Looking around I found that the issue comes from missing support for Zip64 in my JDK/JRE (https://blogs.oracle.com/xuemingshen/entry/zip64_support_for_4g_zipfile), which was added

how to zip a folder itself using java

Suppose I have the following directory structure. Inside january there are suppose two excel files say A.xls and B.xls. There are many places where it has been written about how to zip files using java.util.zip. But I want to zip the january folder itself inside reports folder so that both january and january.zip will be present inside reports. (That means

java Extracting Zip file

I’m looking for a way to extract Zip file. So far I have tried java.util.zip and org.apache.commons.compress, but both gave a corrupted output. Basically, the input is a ZIP file contain one single .doc file. java.util.zip: Output corrupted. org.apache.commons.compress: Output blank file, but with 2 mb size. So far only the commercial software like Winrar work perfectly. Is there a

Read Content from Files which are inside Zip file

I am trying to create a simple java program which reads and extracts the content from the file(s) inside zip file. Zip file contains 3 files (txt, pdf, docx). I need to read the contents of all these files and I am using Apache Tika for this purpose. Can somebody help me out here to achieve the functionality. I have

Advertisement