Release Notes for TrueZIP 6.2

(August 7th, 2006)

Introduction

This is a maintenance and feature release. The primary focus has been to optimize multithreading performance, fix minor bugs and enhance the Javadoc. Updating is recommended for multithreaded environments such as application servers.

Feedback for Swing based key prompting

Until this release, TrueZIP blocked the current thread and AWT's Event Dispatching Thread for three seconds if a user entered a wrong key in the default Swing based Key Manager implementation. This was intended to prevent robots trying passwords systematically.

As of now, a new Feedback interface hierarchy has been introduced instead. The run() method of this interface is called whenever a password dialog is showing. Implementations are expected to start visible/audible feedback to the user without blocking the current thread, which is AWT's Event Dispatching Thread. So if the implementation wants to show an animation, it should use the class javax.swing.Timer.

The default implementation for the InvalidOpenKeyFeedback interface (named BasicInvalidOpenKeyFeedback) just sounds a beep and disables the OK button in the enclosing JOptionPane for three seconds, effectively inhibiting the use of robots for automatic password trying again. If application developers want to provide a sexier implementation, they should subclass BasicInvalidOpenKeyFeedback, provide a public no-arguments constructor and put the class name in the system property de.schlichtherle.key.passwd.swing.InvalidOpenKeyFeedback.

An example is already provided with TrueZIP, but not enabled by default: The class de.schlichtherle.key.passwd.swing.QuakingWindowFeedback will show a nice earthquake effect on the password dialog box for a second. The idea for this class has been taken from the great book "Swing Hacks" by Joshua Marinacci & Chris Adamson, though this implementation provides a bit more realistic effect. If you would like to see it in action, use the nzip utility main class like this:

java -cp "truezip-6.jar;lcrypto-jdk14-130.jar" nzip mkdir test.tzp
java -cp "truezip-6.jar;lcrypto-jdk14-130.jar" nzip ll test.tzp

Note: On non-Windows platforms, substitute the ";" with a ":".

This will create an RAES encrypted ZIP file named "test.tzp" in your current directory and then list its contents (which are empty, hence no output). To see the earthquake effect, simply provide a wrong password on the second command.

Browsing files with a JComboBox

Auto completion of file names is a much liked feature of any decent command line shell (such as the bash). But why leave all the fun only for command line shells? The class de.schlichtherle.io.swing.FileComboBoxBrowser is here for your rescue: It provides users with a comfortable means to use auto completion for file names in a regular JComboBox.

To use this class, do something like this:


JComboBox box = new JComboBox();
new FileComboBoxBrowser(box);
box.setEditable(true);

The second line is where the magic happens: It creates a new FileComboBoxBrowser and attaches it to the previously created JComboBox. Now if a user starts entering any character into the combo box, it will be interpreted as the beginning of an absolute or relative path name. All possible completions are then put into the popup window and shown. Then the user can use the arrow keys on his keyboard to pick his favourite file or directory. This repeats until the focus leaves the editing text component of the combo box.

As usual with TrueZIP, this component allows to browse archive files (e.g. ZIP files), too.

Experiments have shown that this is a very powerfull feature: Using this combo box is usually much faster than the JFileChooser. Of course, in a professional client application you should offer both a JComboBoxBrowser and TrueZIP's custom implementation of the JFileChooser in the class de.schlichtherle.io.swing.JFileChooser, so that the user can pick files or directories (even within an archive file) using either way.

Legend
New Introduces a new feature.
Fixed Introduces a bug fix of an existing feature.
Enhanced Introduces the enhancement of an existing feature. This update is fully backwards compatible.
Changed Introduces the change of an existing feature. This update may cause backwards incompatibilities .
Deprecated Introduces the deprecation of an existing feature.

List of Updates (Change Log)

Following is an overview of all updates in this release which affect the public API. Please note that internal refactorings are not listed. For a full list of updates, please refer to the CVS repository and diff to the tag TrueZIP-6_1.

  1. New/Enhanced: The interaction between the RAES key authentication code and the KeyManager has been refined so that the GUI is not blocked for three seconds anymore if the user has provided a wrong key. Instead, a new Feedback interface hierarchy has been introduced to provide advanced feature options. Read more...
  2. New: The class de.schlichtherle.io.swing.FileComboBoxBrowser has been introduced in order to provide users with a comfortable means to use auto completion for file names in a combo box. Read more...
  3. Enhanced: The virtual file system now uses a custom read/write lock mechanism to enhance concurrency: Multiple threads may read an archive concurrently while at most one thread may write/modify it at a time.
  4. Fixed: The constructor de.schlichtherle.io.DefaultArchiveDetector(String) did not throw an IllegalArgumentException when an unknown suffix was passed, as opposed to the Javadoc.
  5. Enhanced: The class de.schlichtherle.io.DefaultArchiveDetector now logs at the WARNING level if the DEFAULT entry in a configuration file names an unknown archive suffix.
  6. Enhanced: The methods get/setParentWindow in the class de.schlichtherle.key.passwd.swing.PromptingKeyManager have been changed in order to prevent memory leaks and return the active window as the default. In consequence, client applications do not normally need to call setParentWindow(Window) at all anymore.
  7. Changed: The class de.schlichtherle.swing.event.PanelAdapter has been made abstract in order to reflect its use case.