              The  ArchiveAccessor Bean Suite 
                 Frequently Asked Questions
                 --------------------------

These are some most frequently asked questions we get about 
the ArchiveAccessor Bean Suite. We will continue to add new 
questions/ answers as they arise. So, if you have any 
questions concerning the ArchiveAccessor Bean Suite, check 
this FAQ first.


Contents
--------
  Beginner FAQ
  General FAQ
  Troubleshooting FAQ


Beginner FAQ
------------

Q: What is the ArchiveAccessor Bean Suite?
A: The ArchiveAccessor Bean Suite is a suite of non-visual 
   beans intended for organizing visual work process with 
   the archive.

Q: How many beans are there in the suite?
A: There are two beans in the suite now: the JarFileAccessor 
   Bean and the ZipFileAccessor Bean.

Q: What is the JarFileAccessor Bean?
A: The JarFileAccessor Bean covers functionality of the 
   JAR.EXE command and performs the following functions: 
   adds files to the Jar file, replaces files in the Jar 
   file, removes files from the Jar file, extracts files 
   from the Jar file, renames files in the Jar file, gets
   contents of the Jar file, supports the manifest file.

Q: What is the ZipFileAccessor Bean?
A: The JarFileAccessor bean performs the following functions: 
   adds files to the Zip file, replaces files in the Zip file, 
   removes files from the Zip file, extracts files from the 
   Zip file, renames files in the Zip file, gets contents of 
   the Zip file.

Q: Are the beans 100% pure java?
A: Although it is not officially certified by Sun, the 
   ArchiveAccessor Bean Suite is written in 100%-Pure Java. 
   This is also proved by its success with Sun's JavaPureCheck.

Q. How can I use the ArchiveAccessor Bean Suite?
A. To use the ArchiveAccessor Bean Suite as JavaBeans, simply 
   mport JAR file archiveaccessor.jar into a particular builder 
   tool you are using.

Q: How do I start the Demo Application?
A: Set CLASSPATH for array.jar and
   uicontrols.jar. (you can download array.jar and uicontrols.jar
   libraries from alphaWorks ( www.alphaworks.ibm.com ) )
   Call command: run_jfa_demo.bat or run_zfa_demo.bat

Q: What is a default directory?
A: This is a directory from which searching for files to add to 
   the archive is started, if a file does not have an absolute 
   pathname. The same directory can be used as an origin while 
   performing function extract.

Q: Can I create a file archive without any compress algorithms?
A: Yes, sure. It you set property useCompression = false, the 
   archive is created without compression.

Q: In which way can I set a created jar file name?
A: You can set a property name = "name_jar_file" or use the saveAs 
   function ("name_jar_file"). So, the archive is saved with a 
   given name.

Q: What can happen if I open a new archive without saving the 
   changes done?
A: If the automaticSave property is set true, the previous archive 
   is saved automatically before opening a new one. If the
   automaticSave property = false, all changes done are lost.

Q: Will the manifest file be created automatically for the Jar file?
A: If the createManifest property is set true, the manifest file is 
   created automatically.


General FAQ
-----------

Q: How can the current manifest file be included in the Jar file?
A: You should set the createManifest property = false, but the
   includeManifest property = true. In that case the manifest file 
   is included if it is in the default directory.

Q: How can I place the whole catalog contents in the archive?
A: You should set the defaultDirectory property equal to a catalog 
   which you want to archive, and  use the add() function without 
   parameters.


Q: How can I extract the file contents from the archive?
A: You should set the defaultDirectory property equal to a catalog 
   you want to extract and perform the extract()function. A catalog 
   and file hierarchy equaled the archive contents is created in 
   this catalog.

Q: Can I rename a file in the archive?
A: Sure. Use the rename("old _name_file","new_name_file") function.

Q: Can I remove a file from the archive?
A: Sure. Use the remove("name-file")function.

Q: Can i add a new file to a current archive?
A: Yes, sure. Use the add("name-file")function.

Q. How can I use the ArchiveAccessor bean API?
A. Let us study a small example for the JarFileAccessor bean.

   import com.ibm.archiveaccessor.jarfileaccessor.*;
   import java.util.Enumeration;

   /**
    * This class reads and prints the contents of the Jar file.
    *
    */
   class JarExample {

    public static void main(String[] args) {

     if (args.length == 0)
      System.out.println("No Jar file to read");

    try {

     JarFileAccessor accessor = new JarFileAccessor(args[0]);
     String[] list = accessor.contents();
     System.out.println("\nContents of a Jar file " + args[0]
                                               + '\n');
     for (int i = 0, j = list.length; i < j; i++)
        System.out.println(list[i]);

     Enumeration e = accessor.contentsAsEnumeration();
     System.out.println("\nContents of a Jar file " + args[0]
                                               + '\n');
     while (e.hasMoreElements())
        System.out.println((String) e.nextElement());
        accessor.close();
     }
     catch (JarFileAccessorException e) {

        System.out.println(e.getMessage());
	e.printStackTrace();
     }
  }
}


Troubleshooting FAQ
-------------------

Q. The java compiler cannot find some classes from the
   ArchiveAccessor Bean package.
A. Be sure that the archiveaccessor.jar file is in your 
   CLASSPATH. Add this file to CLASSPATH if it is not 
   added.

Q. It is impossible to connect an event with a non-void method
   with 0-1 parameters visually.
A. This is Symantec Visual Cafe feature.

--------------------------------------------------------------