src/main/java/org/jboss/util/file/JarUtils.java
public static void jar(OutputStream out, File src) throws IOException
   {
      jar(out, new File[] { src }, null, null, null);
   }
public static void jar(OutputStream out, File src) throws IOException
   {
      jar(out, new File[] { src }, null, null, null);
   }
public static void jar ( OutputStream out , File src ) throws IOException { jar ( out , new File [ ] { src } , null , null , null ) ; }
<P>This function will create a Jar archive containing the src
file/directory.  The archive will be written to the specified
OutputStream.</P>

<P>This is a shortcut for<br>
<code>jar(out, new File[] { src }, null, null, null);</code></P>

@param out The output stream to which the generated Jar archive is
written.
@param src The file or directory to jar up.  Directories will be
processed recursively.
@throws IOException
<P > This function will create a Jar archive containing the src file / directory . The archive will be written to the specified OutputStream . < / P >