apache-commons-compress

Gradle Does Not Include Optional Dependency

十年热恋 提交于 2020-01-29 07:12:26
问题 I have a project which has the apache-compress library as a compile time dependency. This library appears to use Maven and has a POM file with a dependency set up as "optional". Here is the relevant section of the POM file: <dependency> <groupId>org.tukaani</groupId> <artifactId>xz</artifactId> <version>1.5</version> <optional>true</optional> </dependency> Gradle does not seem to include this library in to my project, I'm guessing it is because of the "optional" attribute. Is there some way

Gradle Does Not Include Optional Dependency

时光毁灭记忆、已成空白 提交于 2020-01-29 07:12:14
问题 I have a project which has the apache-compress library as a compile time dependency. This library appears to use Maven and has a POM file with a dependency set up as "optional". Here is the relevant section of the POM file: <dependency> <groupId>org.tukaani</groupId> <artifactId>xz</artifactId> <version>1.5</version> <optional>true</optional> </dependency> Gradle does not seem to include this library in to my project, I'm guessing it is because of the "optional" attribute. Is there some way

Java Compression Library To Support Deflate64

橙三吉。 提交于 2019-12-23 12:41:59
问题 Looking for an alternative compression java library to Apache Commons Compress (https://commons.apache.org/proper/commons-compress/). Commons Compress throws an error when trying to read a zip entry that was compressed using "ENHANCED_DEFLATED" which is deflate64. Here is sample excerpt that throws the exception. public void doRecurseZip(File inputFile) throws IOException{ ZipFile srcZip = null; srcZip = new ZipFile(inputFile); final Enumeration<ZipArchiveEntry> entries = srcZip.getEntries();

Add files and repertories to a Tar archive with Apache Commons Compress library in non machine dependent way

扶醉桌前 提交于 2019-12-19 04:38:09
问题 I'm working on an application that need to create a tar archive in order to calculate his hash. But I encounter some problems : the tar is not the same in different machine, then the hash calculated is different I'm not able to add directories properly If I add an zip file, at the end, in the tar, I have the content off my zip file :/ I have read different post in SO and the dedicated tutorial on apache, and also the source test code of the apache commons compress jar, but I don't get the

Add files and repertories to a Tar archive with Apache Commons Compress library in non machine dependent way

可紊 提交于 2019-12-01 01:20:59
I'm working on an application that need to create a tar archive in order to calculate his hash. But I encounter some problems : the tar is not the same in different machine, then the hash calculated is different I'm not able to add directories properly If I add an zip file, at the end, in the tar, I have the content off my zip file :/ I have read different post in SO and the dedicated tutorial on apache, and also the source test code of the apache commons compress jar, but I don't get the right solution. Are there anybody that can find where my code is not correct ? public static File

Gradle Does Not Include Optional Dependency

偶尔善良 提交于 2019-11-30 20:42:40
I have a project which has the apache-compress library as a compile time dependency. This library appears to use Maven and has a POM file with a dependency set up as "optional". Here is the relevant section of the POM file: <dependency> <groupId>org.tukaani</groupId> <artifactId>xz</artifactId> <version>1.5</version> <optional>true</optional> </dependency> Gradle does not seem to include this library in to my project, I'm guessing it is because of the "optional" attribute. Is there some way to tell Gradle to include this dependency without explicitly including the xz library myself? Here is my

Compress directory to tar.gz with Commons Compress

戏子无情 提交于 2019-11-29 13:34:47
问题 I'm running into a problem using the commons compress library to create a tar.gz of a directory. I have a directory structure that is as follows. parent/ child/ file1.raw fileN.raw I'm using the following code to do the compression. It runs fine without exceptions. However, when I try to decompress that tar.gz, I get a single file with the name "childDirToCompress". Its the correct size so the files have clearly been appended to each other in the tarring process. The desired output would be a

Read tar.gz in Java with Commons-compression

主宰稳场 提交于 2019-11-29 04:23:21
Ok so I want to read the contents of a tar.gz file (or a xy) but that's the same thing. What I am doing is more or less this: TarArchiveInputStream tarInput = new TarArchiveInputStream(new GzipCompressorInputStream(new FileInputStream("c://temp//test.tar.gz"))); TarArchiveEntry currentEntry = tarInput.getNextTarEntry(); BufferedReader br = null; StringBuilder sb = new StringBuilder(); while (currentEntry != null) { File f = currentEntry.getFile(); br = new BufferedReader(new FileReader(f)); System.out.println("For File = " + currentEntry.getName()); String line; while ((line = br.readLine()) !

Read tar.gz in Java with Commons-compression

时光毁灭记忆、已成空白 提交于 2019-11-27 18:12:53
问题 Ok so I want to read the contents of a tar.gz file (or a xy) but that's the same thing. What I am doing is more or less this: TarArchiveInputStream tarInput = new TarArchiveInputStream(new GzipCompressorInputStream(new FileInputStream("c://temp//test.tar.gz"))); TarArchiveEntry currentEntry = tarInput.getNextTarEntry(); BufferedReader br = null; StringBuilder sb = new StringBuilder(); while (currentEntry != null) { File f = currentEntry.getFile(); br = new BufferedReader(new FileReader(f));