Questions tagged [apache-commons-compress]

Apache Commons Compress is a compression toolkit that supports several compression and archival formats not included with the Java programming language.

Apache Commons Compress is a component of the Apache Commons project. Apache Commons Compress is a compression and archival library, is open source software distributed under the Apache License, Version 2.0, and supports numerous formats including: ar, cpio, xz, and bzip2.

87 questions
0
votes
0 answers

File Organization in a tar.gz archive

While I observed that usually the files inside a folder are listed sequentially in a tar.gz archive in one exceptional case I found that it is listed in a random manner. E.g., let's say there are three folders a, b, and c and each contains 1,2,3…
Arunavo
  • 34
  • 2
  • 8
0
votes
0 answers

Validate zip archive in a strict fashion

There is a semi-broken zip-archive that could be extracted from but gives a semi-broken file. Ubuntu Archive Manager extracts from the archive, but gives a warning: The following Java code gives no errors at all: import…
Denis Kulagin
  • 8,472
  • 17
  • 60
  • 129
0
votes
1 answer

Apache commons-compress

I am using commons-compress to process tarball files and noticed that even files which are not tar seem to be processed. Why is this -- is there a better library to detect valid tar files org.apache.commons
Yana K.
  • 1,926
  • 4
  • 19
  • 27
0
votes
1 answer

Apache common compress giving weird errors on inclusion to android project

I am getting weird errors ever since I have included apache common compress in my gradle file. Here how I did it implementation 'org.apache.commons:commons-compress:1.19' These are the errors I am getting Java…
0
votes
1 answer

How to decompress BZIP (not BZIP2) with Apache Commons

I have been working on a task to decompress from different types of file format such as "zip,tar,tbz,tgz". I am able to do for all except tbz because apache common compress library provides BZIP2 compressors. But I need to decompress a old BZIP not…
0
votes
1 answer

Compressing InputStream using apache commons compress library

I have a school assignment that requires my to take in an inputstream and compress it into a byte array with one of 5 formats (by the user specification) using the apache commons compress library. The 5 formats are: ZIP, JAR, SEVENZ, BZIP2 and GZIP.…
0
votes
1 answer

Get InputStream out of TarArchiveInputStream

I'm getting files from an FTP. The files I'm getting are either text files or tar.gz For text files I just send them to S3. If I encounter a tar.gz I want to untar it and save each file with the same method. public void handleFile() { try…
gyc
  • 4,300
  • 5
  • 32
  • 54
0
votes
0 answers

NoSuchMethodException while parsing on Apache Nutch

I am crawling using Apache Nutch 1.13 . During parse step I am getting this error. I am not able to produce the url leading to this error java.lang.Exception: java.lang.NoSuchMethodError:…
0
votes
0 answers

Listing tar archive contents (java commons compress) returns variable number of entries, then stream closed exception. How to fix?

I have researched this issue for quite some time on google and stackoverflow. Unfortunately, I can't seem to find any resources that seem to address this issue. Admittedly, my search-fu isn't the best; any help, examples, or pointers to relevant…
0
votes
1 answer

How to create a encrypted Zip file with Apache Commons Compress?

I use Apache Common Compress in my file manager app in android, but i can not find any example or document about creating encrypted file. Can some one help me please!
HaiMH
  • 43
  • 1
  • 4
0
votes
0 answers

Java use Apache common compress to unzip file

I have a zip file with a directory like below: Is there anyway I can Apache common compress to decompress the entire zip file, so whenever a directory is a tar file or a tgz file, it will also be decompressed to the directory. Or I have to…
0
votes
0 answers

Writing Jena Models to Tar.Gz archives

I am working with RDF models at the moment. Therefore I query data from a database, generate models using Apache Jena and work with them. Although, I don't want to have to query the models every time I use them, so I thought about storing them…
Obererpel
  • 55
  • 14
0
votes
0 answers

How to archive (zip) File with apache commons

How can I archive two files in java? I thought of code like: public void archiveFiles(FileInputStream file1, FileInputStream file2, String fileName) throws IOException, ArchiveException { ZipArchiveOutputStream zipArchiveOutputStream = new…
roki
  • 348
  • 3
  • 15
0
votes
1 answer

Why NoPointerExcepeion when decompression by apache compress?

click and see The NoPointerExcepeion I generate tar.gz files and send 2 others 4 decompress, but their progrem has error above(their progrem was not created by me), only one file has that error. But when using command 'tar -xzvf ***' on my computer…
Geek2Sages
  • 67
  • 2
  • 7
0
votes
0 answers

commons-compress TarArchiveEntry.getName() Invalid File Path

I'm using the apache commons compress example from another post on here to extract files from a tar but it is failing with: java.io.IOException: Invalid file path. This only happens with SOME of the vmware ova files I'm passing to it (which are…
Damon
  • 305
  • 1
  • 5
  • 13