All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sun.beanbox.JarAccess

java.lang.Object
   |
   +----sun.beanbox.JarAccess

public class JarAccess
extends 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 Index

 o JarAccess()

Method Index

 o create(OutputStream, File, String, String[])
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
 o create(OutputStream, JarEntrySource[])
Creates a new ZIP file with a bunch of entries
 o create(OutputStream, String[])
Creates a new ZIP file with a bunch of files
 o error(String)
Print an error message
 o main(String[])
A command line interface.
 o makeManifestEntry(String)
An InputStream with the data about the Manifest
 o output(String)
Print an output message

Constructors

 o JarAccess
 public JarAccess()

Methods

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

 o create
 public static void create(OutputStream out,
                           File baseDir,
                           String beanFile,
                           String files[]) throws 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

 o makeManifestEntry
 public static JarEntrySource makeManifestEntry(String beanName)
An InputStream with the data about the Manifest

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

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

 o output
 protected static void output(String s)
Print an output message

 o error
 protected static void error(String s)
Print an error message


All Packages  Class Hierarchy  This Package  Previous  Next  Index