TrueZIP is a Java based plug-in framework for virtual file systems (VFS) which provides transparent access to archive files as if they were just plain directories - see Key Features. The most recent version is TrueZIP 7.4.3 - see Change Log.
TrueZIP ships with the following pluggable file system driver modules:
| Module | Description |
|---|---|
| TrueZIP Driver FILE | Provides read/write access to the platform file system. Automatically uses NIO.2 if JSE 7 is available. |
| TrueZIP Driver HTTP(S) | Provides read-only access to HTTP(S) URLs. |
| TrueZIP Driver TAR | Provides read/write access to TAR, TAR.GZ and TAR.BZ2 files. |
| TrueZIP Driver ZIP | Provides read/write access to ZIP, JAR, EAR, WAR etc. Supports appending to existing ZIP files, recovery of lost ZIP entries, WinZip AES encryption, BZIP2 compression, selectable character sets, external file attributes and ZIP64 extensions. |
| TrueZIP Driver ZIP.RAES (TZP) | Provides read/write access to JAR files which are entirely wrapped in an envelope with AES-256/CTR encryption, SHA-256 authentication and PKCS #12 V1 PBKDF. |
Add the JAR artifact of these modules to the run time class path to make their file system drivers available for service location in the client API modules - see below.
As a library, TrueZIP provides uniform, transparent, thread-safe, read/write access to archive files as if they were just plain directories in a file system path. Starting with TrueZIP 7.2, there are two client API modules available which can get used concurrently to access the same (virtual) file systems:
| Module | Description | Requires |
|---|---|---|
| TrueZIP File* | Provides classes which can get used in exactly the same way as the java.io.File* classes, so it's easy to learn or migrate an existing application. In addition, easy to use, yet powerful methods for standard tasks like file or directory tree copying, moving, deleting, traversing etc are provided, too. | JSE 6 |
| TrueZIP Path | Provides classes which implement a java.nio.file.spi.FileSystemProvider for the NIO.2 API (JSR 203) to enable an application to access archive files within any (virtual) file system, e.g. via HTTP(S). Applications can even read or write archive entries in random order using a SeekableByteChannel. | JSE 7 |
Writing an application for either API is really easy: Have a look at the Use Cases for some samples using the API of the module TrueZIP File*.
As a framework, TrueZIP provides the interfaces and classes to write file system drivers which plug-in to its federated file system space. The module TrueZIP Kernel provides federating, multithreading, multiplexing, caching and accounting so that archive file system drivers do not need to take care of these aspects of a virtual file system.
There is no tutorial for how to write a file system driver, but there's comprehensive Javadoc and sample code:
For sample code, please check out or download the source code of this project and consult the file system driver implementations which ship with TrueZIP, e.g. TrueZIP Driver FILE or TrueZIP Driver ZIP.
Note that the documentation on this site is generally split across modules, so please check the section Project Modules in the navigation bar on this page, too.
If you're still not fed up, you might also want to check out The TrueZIP Blog or the TrueZIP Developer Website.
There's an article for this here, too!
Enjoy TrueZIP!