org.codehaus.cargo.util
Class JarUtils

java.lang.Object
  extended by org.codehaus.cargo.util.JarUtils

public final class JarUtils
extends java.lang.Object

Some utility classes for manipulating JAR files.

Version:
$Id $

Constructor Summary
JarUtils()
           
 
Method Summary
protected  void createJarFromDirectory(java.io.File root, java.io.File directory, java.util.jar.JarOutputStream jarStream)
          Create a jar file from a particular directory.
 java.io.File createJarFromDirectory(java.lang.String directory, java.io.File outputJar)
          Create a JAR file from a directory, recursing through children.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JarUtils

public JarUtils()
Method Detail

createJarFromDirectory

protected void createJarFromDirectory(java.io.File root,
                                      java.io.File directory,
                                      java.util.jar.JarOutputStream jarStream)
                               throws java.io.IOException
Create a jar file from a particular directory.

Parameters:
root - in the root directory
directory - in the directory we are adding
jarStream - the jar stream to be added to
Throws:
java.io.IOException - on IOException

createJarFromDirectory

public java.io.File createJarFromDirectory(java.lang.String directory,
                                           java.io.File outputJar)
                                    throws java.io.IOException
Create a JAR file from a directory, recursing through children.

Parameters:
directory - in directory source
outputJar - in file to output the jar data to
Returns:
out File that was generated
Throws:
java.io.IOException - when there is an I/O exception


Copyright © 2004-2009 Codehaus. All Rights Reserved.