OpenCard  
 
OCF, the OpenCard Framework is a standard Java framework for working with Smart Cards.  
 

com.ibm.tools.rejar
Class JarFile

java.lang.Object
  |
  +--com.ibm.tools.rejar.JarFile

public class JarFile
extends java.lang.Object

JarFile provides a few methods for creating jarfiles...

Version:
$Id: JarFile.java,v 1.1 1999/12/02 16:06:17 damke Exp $

Method Summary
 void addDirectory(java.lang.String pathName)
          add a directory to the jar archive
 void addFile(java.lang.String fileName, int fileSize, java.io.InputStream is)
          add a file to the jar archive
 void close()
          close jarfile
static void copyJar2Jar(java.io.PrintWriter msg, java.io.File destinationJar, java.io.File[] sourceJars)
           
static JarFile create(java.io.File newFile)
          create a new JarFile instance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static JarFile create(java.io.File newFile)
                      throws java.lang.Exception
create a new JarFile instance
Parameters:
fileName - The filename for the jar-archive.

addDirectory

public void addDirectory(java.lang.String pathName)
                  throws java.lang.Exception
add a directory to the jar archive
Parameters:
pathName - Contains directory name to add to the jarfile. Format precondition: no leader "/" or "./" and path must end with "/"

addFile

public void addFile(java.lang.String fileName,
                    int fileSize,
                    java.io.InputStream is)
             throws java.lang.Exception
add a file to the jar archive
Parameters:
fileName - The name of the entry for this file in the jar-archive. Precondition: no leader "/".
is - Copies the whole data from the InputStream into the jar-entry.

close

public void close()
           throws java.lang.Exception
close jarfile

copyJar2Jar

public static void copyJar2Jar(java.io.PrintWriter msg,
                               java.io.File destinationJar,
                               java.io.File[] sourceJars)