neosim.util
Class JarAccess

java.lang.Object
  |
  +--neosim.util.JarAccess

public class JarAccess
extends java.lang.Object

This class implements a simple utility for creating files in the JAR (Java Archive) file format. The JAR format is based on the ZIP file format, with optional meta-information stored in a MANIFEST entry. It borrows from JDK's jar tool.


Constructor Summary
JarAccess()
           
 
Method Summary
static void create(java.io.OutputStream out, java.io.File baseDir, java.lang.String beanFile, java.lang.String[] files)
          Create a new JAR file; Given a base directory, a beanfilename, and a set of files names, these two relative to the base directory if baseDir is null, it means WD if beanFIle is null, it means generate no MANIFEST Generates a *non-signed* MANIFEST
static void create(java.io.OutputStream out, JarEntrySource[] entries)
          Creates a new ZIP file with a bunch of entries
static void create(java.io.OutputStream out, java.lang.String[] files)
          Creates a new ZIP file with a bunch of files
protected static void error(java.lang.String s)
          Print an error message
static void main(java.lang.String[] args)
          A command line interface.
static JarEntrySource makeManifestEntry(java.lang.String beanName)
          An InputStream with the data about the Manifest
protected static void output(java.lang.String s)
          Print an output message
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JarAccess

public JarAccess()
Method Detail

main

public static void main(java.lang.String[] args)
A command line interface. Usage is: jar [-bean BeanFileName] [-dir Directory] JarName fileNames...

create

public static void create(java.io.OutputStream out,
                          java.io.File baseDir,
                          java.lang.String beanFile,
                          java.lang.String[] files)
                   throws java.io.IOException
Create a new JAR file; Given a base directory, a beanfilename, and a set of files names, these two relative to the base directory if baseDir is null, it means WD if beanFIle is null, it means generate no MANIFEST Generates a *non-signed* MANIFEST

makeManifestEntry

public static JarEntrySource makeManifestEntry(java.lang.String beanName)
An InputStream with the data about the Manifest

create

public static void create(java.io.OutputStream out,
                          java.lang.String[] files)
                   throws java.io.IOException
Creates a new ZIP file with a bunch of files

create

public static void create(java.io.OutputStream out,
                          JarEntrySource[] entries)
                   throws java.io.IOException
Creates a new ZIP file with a bunch of entries

output

protected static void output(java.lang.String s)
Print an output message

error

protected static void error(java.lang.String s)
Print an error message