TrueZIP is a Java based virtual file system (VFS) implementation for transparent read/write access to archive files as if they were directories.

See:
          Description

Packages
de.schlichtherle Contains utility main classes for various archive file operations.
de.schlichtherle.awt Custom AWT GUI classes.
de.schlichtherle.crypto Utility classes for general cryptograpic purposes.
de.schlichtherle.crypto.generators Pseudo Random Number Generators (PRNG).
de.schlichtherle.crypto.io Utility classes for encryption and decryption.
de.schlichtherle.crypto.io.raes Reads and writes files according to the Random Access Encryption Specification (RAES).
de.schlichtherle.crypto.modes Block cipher modes.
de.schlichtherle.io Start here: Provides transparent read/write access to archive files and their entries as if they were (virtual) directories and files.
de.schlichtherle.io.archive Essential interfaces which are required by archive drivers to interface with the package de.schlichtherle.io.
de.schlichtherle.io.archive.spi The Service Provider Interface (SPI) for pluggable archive drivers.
de.schlichtherle.io.archive.tar The archive driver family for TAR files.
de.schlichtherle.io.archive.zip The archive driver family for ZIP files.
de.schlichtherle.io.archive.zip.raes The archive driver family for RAES encrypted ZIP files.
de.schlichtherle.io.rof Provides random read only access to files (as opposed to the random read/write access provided by RandomAccessFile).
de.schlichtherle.io.swing Swing GUI classes to browse the file system, including archive files.
de.schlichtherle.io.swing.tree Support classes for the package de.schlichtherle.io.swing.
de.schlichtherle.io.util Utility interfaces and classes for I/O.
de.schlichtherle.key An extensible, generalized manager for keys of arbitrary type required to create or open protected resources.
de.schlichtherle.key.passwd.console The console I/O based implementation of the abstract base class KeyManager in the package de.schlichtherle.key.
de.schlichtherle.key.passwd.swing The Swing GUI based implementation of the abstract base class KeyManager in the package de.schlichtherle.key.
de.schlichtherle.nio.charset A custom implementation of the "IBM437" character set.
de.schlichtherle.nio.charset.spi A custom implementation of the "IBM437" character set.
de.schlichtherle.swing Custom Swing GUI classes.
de.schlichtherle.swing.event Support classes for the package de.schlichtherle.swing.
de.schlichtherle.util General utility classes.
de.schlichtherle.util.regex  
de.schlichtherle.util.zip A drop-in replacement for the classes in the package java.util.zip which read and write ZIP files.

 

TrueZIP is a Java based virtual file system (VFS) implementation for transparent read/write access to archive files as if they were directories. Archive files may be arbitrarily nested and the nesting level is only limited by heap and file system size. TrueZIP's design strategy is to "make simple things easy and complex things possible".

For example, when using the default configuration, the instance new File("app.ear/web.war/WEB-INF/lib/lib.jar/META-INF/MANIFEST.MF") would refer to the text file entry META-INF/MANIFEST.MF within the JAR file entry WEB-INF/lib/lib.jar within the WAR file entry web.war within the EAR file app.ear. The same applies for any other supported and configured archive type.

Limitation: TrueZIP works on files only. If an archive is just available as an InputStream, it needs to be saved to a (temporary) file first. If this is not an option, TrueZIP can't be used.

TrueZIP provides a pluggable archive driver architecture to support virtually any archive type: Out of the box, TrueZIP supports ZIP, SFX/EXE, JAR, TZP, TAR, TAR.BZ2 and TAR.GZ. This list will be extended in future releases. Note that some of these archive types require additional JARs on the runtime class path.

To be minimal intrusive, TrueZIP provides drop-in replacements for many classes in the java.io package. This reduces the learning curve to the essential minimum and allows to introduce TrueZIP's functionality gradually within legacy applications or even other VFS solutions which are currently built on top of java.io.File*.

TrueZIP 6 requires only a J2SE 1.4.2 compatible Java Runtime Environment, but version 6.4 and later automatically benefit from new features available in JSE 5 and even JSE 6.

TrueZIP 6 is covered under the Apache License, Version 2.0.

Support

Please subscribe to the user mailing list via users-subscribe@truezip.dev.java.net to get support and feel free to tell me what you think about TrueZIP. I'm always interested in your opinion, be it good or bad! But read on first, please.

Default Configuration

In TrueZIP 6.5, the following archive types and access parameters are defined by the default configuration resource file in truezip.jar/META-INF/services/de.schlichtherle.io.ArchiveDriverRegistry.properties. Note that only the archive file suffixes "ear|jar|war|zip" are recognized in file paths by default.

Type

Canonical Suffixes0

DEFAULT1

ALL2

Charset3

Dependencies4

Description

ZIP

zip

Yes

Yes

IBM4375

 

ZIP file: Archive file with central directory and compressible entries

JAR

ear|jar|war

Yes

Yes

UTF-8

 

Java Archive: ZIP with custom directory tree layout

ODF odb|odf|odg|odm|odp|ods|odt|otg|oth|otp|ots|ott No Yes UTF-8   OpenDocument Format: If present, the mimetype entry is written first with STORED method.
TZP

tzp|zip.rae|zip.raes

No

Yes

UTF-8

lcrypto.jar6

RAES encrypted ZIP file.

SFX/EXE

exe

No

Yes

system specific

 

ZIP file with a code preamble for self extraction. This driver is pretty slow.

TAR

tar

No

Yes

US-ASCII7

ant.jar8

TAR: Uncompressed tape archive file.

TAR.BZ2

tbz2|tar.bz2

No

Yes

US-ASCII7

ant.jar8

TAR file wrapped in BZIP2 compression format.

TAR.GZ

tar.gz|tgz

No

Yes

US-ASCII7

ant.jar8

TAR file wrapped in GZIP compression format.

0 Suffix recognition is case insensitive with the DefaultArchiveDetector class.
1 Recognized by the predefined instance ArchiveDetector.DEFAULT? Note that this may be extended (but not restricted) in future releases.
2 Recognized by the predefined instance ArchiveDetector.ALL? Note that this may be extended (but not restricted) in future releases.
3 The code page to use for entry names and other entry meta data. This access parameter is determined by the archive driver (not the archive detector) and can be customized by subclassing it.
4 This needs to be on the runtime class path.
5 The charset for ZIP files is not specified. This is a heuristic value which is based on the fact that IBM437 is the original PC character set for the USA and the ZIP file format has been invented there. Do not rely on this!
6 Bouncy Castle's Lightweight Crypto API for JDK 1.4, version 1.30 or higher. Available at http://www.bouncycastle.org/latest_releases.html.
7 The charset for TAR files is not specified. This is a heuristic value which is based on the fact that the TAR file format stems from UNIX implementations of the seventies.
8 Apache's Ant, version 1.6.5 or higher. Version 1.7.0 is recommended for enhanced performance and stability and is required for BZIP2 compression. Available at http://ant.apache.org.