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.
-
JarAccess()
-
-
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
-
create(OutputStream, JarEntrySource[])
- Creates a new ZIP file with a bunch of entries
-
create(OutputStream, String[])
- Creates a new ZIP file with a bunch of files
-
error(String)
- Print an error message
-
main(String[])
- A command line interface.
-
makeManifestEntry(String)
- An InputStream with the data about the Manifest
-
output(String)
- Print an output message
JarAccess
public JarAccess()
main
public static void main(String args[])
- A command line interface.
Usage is:
jar [-bean BeanFileName] [-dir Directory] JarName fileNames...
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
makeManifestEntry
public static JarEntrySource makeManifestEntry(String beanName)
- An InputStream with the data about the Manifest
create
public static void create(OutputStream out,
String files[]) throws IOException
- Creates a new ZIP file with a bunch of files
create
public static void create(OutputStream out,
JarEntrySource entries[]) throws IOException
- Creates a new ZIP file with a bunch of entries
output
protected static void output(String s)
- Print an output message
error
protected static void error(String s)
- Print an error message
All Packages Class Hierarchy This Package Previous Next Index