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
65
votes
14 answers

Appending files to a zip file with Java

I am currently extracting the contents of a war file and then adding some new files to the directory structure and then creating a new war file. This is all done programatically from Java - but I am wondering if it wouldn't be more efficient to copy…
Grouchal
  • 9,756
  • 6
  • 34
  • 46
11
votes
3 answers

Read Zip file content without extracting in java

I have byte[] zipFileAsByteArray This zip file has rootDir --| | --- Folder1 - first.txt | --- Folder2 - second.txt | --- PictureFolder - image.png What I need…
TNN
  • 426
  • 2
  • 6
  • 15
6
votes
3 answers

java.nio.file.Files.isWriteable doesn't agree with java.io.File.canWrite()

I have Java code doing the following: Create a temporary empty file with ZIP extension using File.createTempFile() Delete it with File.delete() (we only really wanted it to generate a temp file name) Copy a "template" ZIP file to the same path with…
user1414274
  • 211
  • 3
  • 6
4
votes
3 answers

Java - Zipping existing files

Possible Duplicate: Appending files to a zip file with Java Hello Java Developers, Here's the scenario: Say I have a textfile named sample.txt. What I actually want to do is to put the sample.txt file into a *.zip file named TextFiles.zip. Here's…
Michael 'Maik' Ardan
  • 4,213
  • 9
  • 37
  • 60
3
votes
2 answers

Trying to edit a property file in jar from a ear file. Best way to do it?

I am thinking using truezip API in Java to manipulate with ear file by extract ear into tmp directory, then search through jars in tmp, if found properties in jar, then extract it into tmp, modify that property then pack it back into jar,…
Tom
  • 369
  • 3
  • 5
  • 17
3
votes
2 answers

How to open password protected zip file using truezip library in java

Please show me sample of code how to open password protected file using truezip library. If you don't have a link to sample code please show me method to open this file.
Grzegorz
  • 31
  • 2
3
votes
2 answers

Is it a bad idea to sub-class java.io.File?

I am having a debate with another developer who dislikes my idea of sub-classing java.io.File for our custom needs (such as, for example, having an AWSFile, or GoogleCloudStorageFile, (for the sake of argument), where we would need to override some…
carlspring
  • 31,231
  • 29
  • 115
  • 197
3
votes
0 answers

TrueZIP for retrieving remote APK descriptors

According to the TrueZIP documentation, the TPath class can retrieve an entry from within an online archive file (https://truezip.java.net/truezip-path/index.html). I wrote a simple program to try and simulate that: String path =…
KidCrippler
  • 1,633
  • 2
  • 19
  • 34
3
votes
1 answer

Restlet - StreamClosedException using StreamingOutput

I'm experiencing problems with my Restlet Resource. It uses TrueZip to build a subset of a Zip Archive and allows the user to download it. // Create a Streaming Response Entity. final StreamingOutput stream = new StreamingOutput() { …
user1291536
  • 127
  • 1
  • 5
3
votes
0 answers

How to reduce TrueVFS dependencies

I was recently looking for a decent library to work with ZIP files. Several post on SO recommended TrueVFS, formerly TrueZip. I need to extract individual files, modify them, and put them back to archive, overriding the old one. The goal is to write…
Espinosa
  • 2,491
  • 24
  • 28
3
votes
1 answer

TrueZip 7 requires Java 7? NoClassDefFoundError: java/nio/file/Path on Java 6

TFile depends on java.nio.file.Path (toPath() method returns java.nio.file.Path) that isn't available on Java 6 so calling any TFile method on Java 6 throws "java.lang.NoClassDefFoundError: java/nio/file/Path" How do you manage to use TFile on Java…
Evgeny Goldin
  • 1,860
  • 2
  • 15
  • 16
3
votes
1 answer

Archive a folder in Java using truezip

I need to create a service that finds specific folders and archives them into on zip file. I saw all kind of examples, but it seems that have to read all the files in every folder. Am I right? Is there another way to do that (maybe using truezip…
Noam
  • 3,049
  • 10
  • 34
  • 52
3
votes
3 answers

TrueZip Random Access Functionality

I'm trying to understand how to randomly traverse a file/files in a .tar.gz using TrueZIP in a Java 6 environment( using the Files classes). I found instances where it uses Java 7's Path, however, I can't come up with an example on how to randomly…
stan
  • 4,885
  • 5
  • 49
  • 72
2
votes
1 answer

append a file to zip using TrueZip

I want to use the TrueZip library to append a file to an existing archive (not by unpacking, adding a file and repacking - the new versions are supposed to have this feature), but I find it a bit difficult to understand the API. Can please…
John Donn
  • 1,718
  • 2
  • 19
  • 45
2
votes
1 answer

Is it possible to extract a large file using Truezip in java?

import java.io.IOException; import utils.myDate; import utils.myLog; import de.schlichtherle.truezip.file.TArchiveDetector; import de.schlichtherle.truezip.file.TFile; public class Main { /** * @param args */ public static void…
1
2 3 4 5