org.apache.anteater.util
Class JarUtil

java.lang.Object
  |
  +--org.apache.anteater.util.JarUtil

public class JarUtil
extends Object

Utilities for playing with jars and wars.

Version:
$Revision: 1.1 $ $Date: 2002/08/10 09:09:16 $
Author:
Jeff Turner

Constructor Summary
JarUtil()
           
 
Method Summary
protected static void debug(String msg)
           
protected static void extractFile(File srcF, File dir, InputStream compressedInputStream, String entryName, Date entryDate, boolean isDirectory)
           
static void main(String[] args)
           
static void unjar(File jarFile, File dir)
          Unjar a jar file to a directory.
static void unjar(org.apache.tools.ant.Project proj, String jarFile, String dir)
          Unjar a jar file to a directory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JarUtil

public JarUtil()
Method Detail

unjar

public static void unjar(org.apache.tools.ant.Project proj,
                         String jarFile,
                         String dir)
                  throws FileNotFoundException,
                         IOException
Unjar a jar file to a directory.

Parameters:
proj - Ant Project from which files are relative to.
jarFile - basedir-relative path to a jar file
dir - basedir-relative path to a directory in which to unjar the jar.
FileNotFoundException
IOException

unjar

public static void unjar(File jarFile,
                         File dir)
                  throws FileNotFoundException,
                         IOException
Unjar a jar file to a directory.

Parameters:
jarFile - Jar file
dir - Directory in which to place jar contents. This will be created if it doesn't exist.
FileNotFoundException
IOException

debug

protected static void debug(String msg)

extractFile

protected static void extractFile(File srcF,
                                  File dir,
                                  InputStream compressedInputStream,
                                  String entryName,
                                  Date entryDate,
                                  boolean isDirectory)
                           throws IOException
IOException

main

public static void main(String[] args)
                 throws Exception
Exception


Ant Functional Tester -- see Project home page for details