org.drools.smf
Class Jarer

java.lang.Object
  extended by org.drools.smf.Jarer

public class Jarer
extends java.lang.Object


Constructor Summary
Jarer(java.io.ByteArrayOutputStream outputStream)
          A Utility class for adding classes in a directory and sub directory to a given jar
Jarer(java.io.File jar)
          A Utility class for adding classes in a directory and sub directory to a given jar
Jarer(java.io.File jar, boolean append)
          A Utility class for adding classes in a directory and sub directory to a given jar
 
Method Summary
 void addByteArray(byte[] bytes, java.lang.String name)
           
 void addCharArray(char[] chars, java.lang.String name)
           
 void addDirectory(java.io.File dir)
          The directory, and sub directories, whoes .class files will be added to the jar.
 void addFile(java.io.File file, java.lang.String name)
           
 void addObject(java.lang.String name, java.lang.Object object)
           
 void close()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Jarer

public Jarer(java.io.File jar)
      throws java.io.FileNotFoundException,
             java.io.IOException
A Utility class for adding classes in a directory and sub directory to a given jar

Parameters:
jar - The jar file to which entries will be added
Throws:
java.io.FileNotFoundException
java.io.IOException

Jarer

public Jarer(java.io.File jar,
             boolean append)
      throws java.io.FileNotFoundException,
             java.io.IOException
A Utility class for adding classes in a directory and sub directory to a given jar

Parameters:
jar - The jar file to which entries will be added
append - Whether to append or overwrite the existing jar
Throws:
java.io.FileNotFoundException
java.io.IOException

Jarer

public Jarer(java.io.ByteArrayOutputStream outputStream)
      throws java.io.FileNotFoundException,
             java.io.IOException
A Utility class for adding classes in a directory and sub directory to a given jar

Parameters:
jar - The jar file to which entries will be added
append - Whether to append or overwrite the existing jar
Throws:
java.io.FileNotFoundException
java.io.IOException
Method Detail

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

addObject

public void addObject(java.lang.String name,
                      java.lang.Object object)
               throws java.io.IOException
Throws:
java.io.IOException

addDirectory

public void addDirectory(java.io.File dir)
                  throws java.io.IOException
The directory, and sub directories, whoes .class files will be added to the jar.

Parameters:
dirobject -
Throws:
java.io.IOException

addFile

public void addFile(java.io.File file,
                    java.lang.String name)
             throws java.io.IOException
Throws:
java.io.IOException

addByteArray

public void addByteArray(byte[] bytes,
                         java.lang.String name)
                  throws java.io.IOException
Throws:
java.io.IOException

addCharArray

public void addCharArray(char[] chars,
                         java.lang.String name)
                  throws java.io.IOException
Throws:
java.io.IOException