IBM®
Skip to main content
    United States change      Terms of use
 
 
Select a scope:    
     Home      Products      Services & industry solutions      Support & downloads      My account     
alphaWorks  >  Java technology  >  

Nested Archive Toolkit for Java

A tool that provides the layout details of archives, including nested or J2EE archives, so that users can efficiently open and update selected archive contents.


Date Posted: May 16, 2006
OverviewRequirements Download FAQs Forum Reviews

What is Nested Archive Toolkit for Java™?

ZIP and JAR files are a standard way of using compression to store sets of files, providing a single packaging unit for improved handling and transfer of multiple files. Java libraries provide basic APIs for reading and creating ZIP and JAR files. The J2EE standard defines particular JAR file types: EAR, WAR, and RAR file. An EAR file is a Java archive (JAR) file and contains as entries nested Web Archive (WAR) files, Resource Archive (RAR) files, EJB archive (EJB JAR) files, and other Java archive (JAR) files. The basic Java APIs provide access to a subset of the values stored within a Java archive. Access is stream-based; random access of archive entries is not provided. The API methods for accessing existing entries, performing updates, or creating new archives require significant development overhead.

The Nested Archive Toolkit for Java contains a collection of Java classes that provide enhanced capabilities for working with virtually any ZIP and JAR files, including J2EE and nested J2EE archives. Because it is a utility, one is able to efficiently scan, access, and update selected files within a nested archive. An API is provided that allows random access to archive entries. A portion of the tool provides interchangeability between archives and directories.

A command line interface provides access to most functions. Access through Java API calls is provided. An Eclipse plug-in provides a view of archives, including all raw archive data and a tree of nested archives.

How does it work?

This technology builds on existing Java APIs for accessing ZIP and JAR files and uses advanced techniques for opening and scanning nested archives. Nested input streams enable the scanning of nested archives without expanding to temporary storage; archive flattening allows random access to nested archive entries; and articulation points allow archives and directories to be handled interchangeably.

The tools are implemented as Java classes and are packaged as individual Eclipse plug-ins:

  • A core support library contains common support function for the other parts of the toolkit.
  • A layout utility is used to scan and display detailed information for a target archive (ZIP or JAR) file. The utility contains a command line and a Java API entry point.
  • A "nesting" utility is used to perform scanning and scanning/copying operations on a target file system. The scanning or scanning/copying operation recursively walks a target file system tree and treats archives and nested archives as interchangeable. The scanning operation is used to provide a comprehensive listing of the contents of the file tree, including file signature information. The scanning/copying operation is used to add, remove, and update entries from any point in the file tree, including within nested archives, and is used to change the setting of a container (that is, a directory or an archive) from a packed state (from being an archive) to an unpacked state (that is, as a directory), and vice versa. The utility contains a command line and a Java API entry point.
  • An Eclipse extension provides a new view type that displays archive information, including detailed information on the each archive entry and entries from nested archives within a tree view. The view is built on top of the layout utility and is accessed through the Eclipse menu (go to Window > Show View, select Other..., and then select ARC > ARC View).

About the technology author(s):
Thomas Bitonti is an IBM advisory software engineer with nearly two decades of software development experience in a variety of roles. Most recently, he has worked on the IBM WebSphere product, making contributions to the UpdateInstaller and to the Server Configuration Model. Mr. Bitonti received a bachelor's degree in mathematics from Carnegie Mellon University in 1985.

Download now Download now

Related technologies

For platform(s):
Windows 2000, Windows XP


 

    About IBM Privacy Contact