Questions tagged [truezip]

Q&A for the TrueZIP Java Open Source Software project.

TrueZIP is a Java based virtual file system (VFS) which enables client applications to perform CRUD (Create, Read, Update, Delete) operations on archive files as if they were virtual directories, even with nested archive files in multithreaded environments

As a library, TrueZIP provides simple, uniform, transparent, thread-safe, read/write access to archive files as if they were virtual directories in a file system path.

As a framework, TrueZIP provides the interfaces and classes to write file system drivers which plug-in to its federated file system space.

For more information, please refer to the TrueZIP User Website

73 questions
2
votes
2 answers

TrueZip creates virtual directory instead of archive

I'm having an issue with the following code: TFile src = new TFile(this.getMellomStasjon()); TFile dst = new TFile(this.getZipFolder()+""+zipFile+".zip"); if(dst.isDirectory()) dst = new TFile(dst, src.getName()); …
ScratchMyTail
  • 281
  • 3
  • 10
2
votes
1 answer

problem with truezip - when debuging, a strange exception is thrown

i have a strange problem with truezip. i run the following code: TFile.setDefaultArchiveDetector(new TArchiveDetector("zip")); String zipFile = "c:\\test\\test.zip"; TFile dstZip = new TFile(zipFile); TFile newFile = new…
AAaa
  • 3,659
  • 7
  • 35
  • 40
2
votes
1 answer

TrueZip - How to decompress inner jar/zip files without expanding them as directories?

I'm creating a tzp file using TrueZip 7, and the cp_rp method to add all directory contents at once to the tzp file. After that, I'm trying to extract all contents of the tzp file to a target directory. However, the call: zipFile = new…
Dan
  • 1,763
  • 4
  • 26
  • 40
2
votes
3 answers

TrueZip exception thrown when calling cp_rp method

I have a really simple program where I'm trying to add a directory to a new zip file. The code: public class Encrypt { public static void main(String[] args) { TFile srcFile = new TFile(args[0]); TFile destFile = new…
Dan
  • 1,763
  • 4
  • 26
  • 40
2
votes
2 answers

How to listfiles() from jar in a tar by using truezip in Java?

I am trying to list all files in a tar, including files in jar. How can I do this by using truezip in Java or other api? Thanks
Tom
  • 369
  • 3
  • 5
  • 17
2
votes
1 answer

TrueZip class could not be instantiated

There's a little program which was running well with TrueZip 6. Recently I've updated TrueZip jars to version 7.7.9 by adding 6 packages to the project's classpath: truezip-driver-file, truezip-driver-tar, truezip-driver-zip, truezip-file,…
Macko Ly
  • 23
  • 4
2
votes
3 answers

TrueZip: NoClassDefFoundError (but for shutdown hook only?)

I have a project using PhantomJS. There is this plugin that will install it automatically: com.github.klieber phantomjs-maven-plugin 0.2.1
Christian Neverdal
  • 5,655
  • 6
  • 38
  • 93
2
votes
1 answer

TrueZip Recursive Unzipping?

Does anyone have experience with the TrueZip java library? I'm trying to do what should be a simple task, unzipping an archive that contains subfolders, and I've so far been unable to get it to work. (The reason I'm using TrueZip is because of the…
CJS
  • 1,455
  • 1
  • 13
  • 17
2
votes
1 answer

How to delete a file inside zip file in android

I want to delete a file from a zip file without extracting it in android. I first did it with java using the following code Path zipFilePath = Paths.get(filePaths); //gave the path of the zip with zip file name try( FileSystem fs =…
Mukund
  • 21
  • 3
2
votes
1 answer

How to get the unzipped file directory by using TrueZip

public class unzipAll { public static void main(final java.lang.String[] args) throws Exception{ TFile src = new TFile("C:/1/BULK.tar.gz"); File dest = new File("C:/Test/"); dest.mkdirs(); try { …
Peter
  • 65
  • 8
2
votes
1 answer

Creating password protected ZIP file using TrueZip

Does anyone know any good example to creating password protected ZIP file using TrueZip? I followed the the example given TrueZip Example but while extracting password protected zip file is not accepting the correct password which I set through java…
Shashwat
  • 2,342
  • 1
  • 17
  • 33
2
votes
1 answer

Split zip with truezip

Referring to this post I have zipped and unzipped folders successfully - TrueZip - How to decompress inner jar/zip files without expanding them as directories? Is there any way to split zip into parts using truezip, similar to 7z which allows us to…
Neelam Sharma
  • 2,745
  • 4
  • 32
  • 73
1
vote
1 answer

How to copy files using TrueZip TPath?

As a follow-up to Convert .tar.gz file to .zip using TrueZip? how does one copy the contents of one compressed file into another using TrueZip? When I invoke: TPath sourceFile = new TPath("c:/foo.zip"); TPath targetFile = new…
Gili
  • 86,244
  • 97
  • 390
  • 689
1
vote
2 answers

Convert .tar.gz file to .zip using TrueZip?

When I invoke: File input = new File("cmake.tar.gz"); TFile sourceFile = new TFile(input); TFile targetFile = new TFile(File.createTempFile("cmake", ".zip")); try { TFile.cp_rp(sourceFile, targetFile, TArchiveDetector.NULL); } finally { …
Gili
  • 86,244
  • 97
  • 390
  • 689
1
vote
2 answers

TPath ignore case when accessing file [Java TrueZip]

Is there a way to access the file inside archive while ignoring file name case using TrueZip? Imagine following zip archive with content: MyZip.zip -> myFolder/tExtFile.txt -> anotherFolder/TextFiles/file.txt -> myFile.txt -> anotherFile.txt ->…
glf4k
  • 429
  • 4
  • 9