electric.util.jar
Class Jar

java.lang.Object
  extended byelectric.util.jar.Jar

public final class Jar
extends java.lang.Object

Jar defines a set of static methods for manipulating jar files.

Author:
webMethods

Constructor Summary
Jar()
           
 
Method Summary
static void jarDirectory(java.lang.String absolutePath, java.lang.String relativePath, java.io.File jarFile)
          Jars a directory in a temporary file
static void saveFile(java.lang.String jarFilePath, java.lang.String filepath, java.lang.String content)
          Creates or opens a jar file and writes to the specified filepath the content.
static void unjarFile(java.io.File destination, java.util.zip.ZipInputStream zipStream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Jar

public Jar()
Method Detail

saveFile

public static void saveFile(java.lang.String jarFilePath,
                            java.lang.String filepath,
                            java.lang.String content)
                     throws java.io.IOException
Creates or opens a jar file and writes to the specified filepath the content.

Parameters:
jarFilePath - The path to the jar file to open or create.
filepath - The path of the file within the jar file.
content - The file content to be added.
Throws:
java.io.IOException

jarDirectory

public static void jarDirectory(java.lang.String absolutePath,
                                java.lang.String relativePath,
                                java.io.File jarFile)
                         throws java.io.IOException
Jars a directory in a temporary file

Parameters:
absolutePath - absolute path of the directory to jar
relativePath - relative path of the directory to jar
jarFile - a file to contain the final jar file
Throws:
java.io.IOException - thrown if the path at absolulutePath doesn't exist or something goes wrong with adding file to jar
java.lang.IllegalArgumentException - thrown if absolutePath is not a directory

unjarFile

public static void unjarFile(java.io.File destination,
                             java.util.zip.ZipInputStream zipStream)
                      throws java.io.IOException
Parameters:
destination -
zipStream -
Throws:
java.io.IOException


copyright© 2001-2004 by webMethods All Rights Reserved.