ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzahh_5.4.0.1/javadoc/utilities/JarMaker.html

976 lines
37 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Tue Sep 16 10:42:46 CDT 2003 -->
<TITLE>
JarMaker
</TITLE>
<META NAME="keywords" CONTENT="utilities.JarMaker,JarMaker class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">
</HEAD>
<SCRIPT>
function asd()
{
parent.document.title="JarMaker";
}
</SCRIPT>
<BODY BGCOLOR="white" onload="asd();">
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../utilities/AS400ToolboxJarMaker.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../utilities/JarMakerEvent.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../index.html" TARGET="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="JarMaker.html" TARGET="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;
<SCRIPT>
<!--
if(window==top) {
document.writeln('<A HREF="../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
utilities</FONT>
<BR>
Class JarMaker</H2>
<PRE>
java.lang.Object
|
+--<B>utilities.JarMaker</B>
</PRE>
<DL>
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../utilities/AS400ToolboxJarMaker.html">AS400ToolboxJarMaker</A></DD>
</DL>
<HR>
<DL>
<DT>public class <B>JarMaker</B><DT>extends java.lang.Object</DL>
<P>
The JarMaker class is used to generate a smaller (and therefore
faster loading) JAR or ZIP file from a larger one,
based on the user's requirements.
<p>
In addition, JarMaker can also be used to:
<ul compact>
<li> <em>extract</em> desired files from a JAR or ZIP file; or
<li> <em>split</em> a JAR or ZIP file into smaller JAR or ZIP files.
</ul>
<p>
A JarMaker object can be included in the user's program,
or JarMaker can be run as a command line program, as follows:
<blockquote>
<pre>
<strong>java utilities.JarMaker</strong> [ options ]
</pre>
</blockquote>
<p>
<b><a name="jmoptions">Options</a></b>
<p>
<dl>
<dt><b><code>-source </b></code><var>sourceJarFile</var>
<dd>
Specifies the source JAR or ZIP file from which to derive the
destination JAR or ZIP file.
If a relative path is specified, the path is assumed to be relative to
the current directory.
If this option is specified as the first positional argument,
the tag (<code>-source</code>) is optional.
The -source option may be abbreviated to -s.
<p>
<dt><b><code>-destination </b></code><var>destinationJarFile</var>
<dd>
Specifies the destination JAR or ZIP file, which will contain the desired subset
of the files in the source JAR or ZIP file.
If a pathname is not specified, the file is created in the current directory.
The -destination option may be abbreviated to -d.
The default name is generated by appending <code>"Small"</code> to the
source file name. For example, if the source file is <code>myfile.jar</code>,
then the default destination file would be <code>myfileSmall.jar</code>.
<p>
<dt><b><code>-requiredFile </b></code><var>jarEntry1[,jarEntry2[...] ] </var>
<dd>
The files in the source JAR or ZIP file that are to be copied to the destination.
Entries are separated by commas (no spaces).
The specified files, along with all of their dependencies,
will be considered required.
Files are specified in JAR entry name syntax, such as <code>com/ibm/as400/access/DataQueue.class</code>.
The -requiredFile option may be abbreviated to -rf.
<p>
<dt><b><code>-additionalFile </b></code><var>file1[,file2[...] ] </var>
<dd>
Specifies additional files (not included in the source JAR or ZIP file)
which are to be copied to the destination.
Entries are separated by commas (no spaces).
Files are specified by either their
absolute path, or their path relative to the current directory.
<br>The specified files will be included, regardless of the settings of
other options.
The -additionalFile option may be abbreviated to -af.
<p>
<dt><b><code>-additionalFilesDirectory </b></code><var>baseDirectory</var>
<dd>
Specifies the base directory for additional files.
This should be the parent directory of the
directory where the package path starts. For example, if file <code>foo.class</code>
in package <code>com.ibm.mypackage</code> is located in directory
<code>C:\dir1\subdir2\com\ibm\mypackage\</code>, then specify base directory <code>C:\dir1\subdir2</code>.
<br>The -additionalFilesDirectory option may be abbreviated to -afd.
The default is the current directory.
<p>
<dt><b><code>-package </b></code><var>package1[,package2[...] ] </var>
<dd>
The packages that are required.
Entries are separated by commas (no spaces).
The -package option may be abbreviated to -p.
Package names are specified in standard syntax, such as <code>com.ibm.component</code>.
<br>Note: The specified packages are simply included in the output.
No additional dependency analysis is done on the files in a package,
unless they are explicitly specified as required files.
<p>
<dt><b><code>-extract </b></code><var>[baseDirectory]</var>
<dd>
Extracts the desired entries of the source JAR or ZIP file
into the specified base directory, without generating a new JAR or ZIP file.
This option enables the user to build up a customized JAR or ZIP file
empirically, based on the requirements of their particular application.
When this option is specified, <code>-additionalFile</code>,
<code>-additionalFilesDirectory</code>, and <code>-destination</code>
are ignored.
The -extract option may be abbreviated to -x.
By default, no extraction is done.
The default base directory is the current directory.
<p>
<dt><b><code>-split </b></code><var>[splitSize]</var>
<dd>
Splits the source JAR or ZIP file into smaller JAR or ZIP files.
No ZIP entries are added or excluded;
the entries in the source JAR or ZIP file are simply distributed
among the destination JAR or ZIP files.
The split size is in units of kilobytes (1024 bytes),
and specifies the maximum size for the destination files.
The destination files are created in the current directory,
and are named by appending integers to the source file name;
any existing files by the same name are overwritten.
For example, if the source JAR file is <code>myfile.jar</code>,
then the destination JAR files would be
<code>myfile0.jar</code>, <code>myfile1.jar</code>, and so on.
When this option is specified, all other options except
<code>-source</code> and <code>-verbose</code> are ignored.
The -split option may be abbreviated to -sp.
The default split size is 2 megabytes (2048 kilobytes).
<p>
<dt><b><code>-verbose </b></code>
<dd>
Causes progress messages to be displayed.
The -verbose option may be abbreviated to -v.
The default is non-verbose.
<p>
<dt><b><code>-help </b></code>
<dd>
Displays the help text.
The -help option may be abbreviated to -h.
The default is non-verbose.
</dl>
<p>
At least one of the following options must be specified:
<ul compact>
<li>-requiredFile
<li>-additionalFile
<li>-package
<li>-extract
<li>-split
</ul>
<p>
If the following options are specified multiple times in a single command
string, only the final specification applies:
<ul compact>
<li>-source
<li>-destination
<li>-additionalFilesDirectory
<li>-extract
<li>-split
</ul>
Other options have a cumulative effect when specified multiple times
in a single command string.
<p>
<b><a name="exam">Example usage</a></b>
<p>
<p>
Suppose the source JAR file is named <code>myJar.jar</code>,
and is in the current directory.
To create a JAR file that contains only the classes
<code>mypackage.MyClass1</code> and
<code>mypackage.MyClass2</code>, along with their dependencies,
do the following:
<pre>
import utilities.JarMaker;
<p>
// Set up the list of required files.
Vector classList = new Vector ();
classList.addElement ("mypackage/MyClass1.class");
classList.addElement ("mypackage/MyClass2.class");
JarMaker jm = new JarMaker ();
jm.setRequiredFiles (classList);
<p>
// Make a new JAR file, that contains only MyClass1, MyClass2,
// and their dependencies.
File sourceJar = new File ("myJar.jar");
File newJar = jm.makeJar (sourceJar); // smaller JAR file
</pre>
<p>
Alternatively, the above action can be performed directly
from the command line as follows:
<pre>
java utilities.JarMaker -source myJar.jar
-requiredFile mypackage/MyClass1.class,mypackage/MyClass2.class
</pre>
</em>
<P>
<P>
<HR>
<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../utilities/JarMaker.html#JarMaker()">JarMaker</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a JarMaker object.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../utilities/JarMaker.html#addJarMakerListener(utilities.JarMakerListener)">addJarMakerListener</A></B>(<A HREF="../utilities/JarMakerListener.html">JarMakerListener</A>&nbsp;listener)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a listener to the listener list.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.io.File</CODE></FONT></TD>
<TD><CODE><B><A HREF="../utilities/JarMaker.html#extract(java.io.File)">extract</A></B>(java.io.File&nbsp;sourceJarFile)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Extracts the desired entries and their dependencies from
the specified JAR or ZIP file.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../utilities/JarMaker.html#extract(java.io.File, java.io.File)">extract</A></B>(java.io.File&nbsp;sourceJarFile,
java.io.File&nbsp;outputDirectory)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Extracts the desired entries and their dependencies from
the specified JAR or ZIP file.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.Vector</CODE></FONT></TD>
<TD><CODE><B><A HREF="../utilities/JarMaker.html#getAdditionalFiles()">getAdditionalFiles</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the additional files that are to be included in
the destination JAR or ZIP file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.Vector</CODE></FONT></TD>
<TD><CODE><B><A HREF="../utilities/JarMaker.html#getPackages()">getPackages</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the names of the packages that are to be included in the output.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.Vector</CODE></FONT></TD>
<TD><CODE><B><A HREF="../utilities/JarMaker.html#getRequiredFiles()">getRequiredFiles</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the names of the required files specified by the user.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../utilities/JarMaker.html#main(java.lang.String[])">main</A></B>(java.lang.String[]&nbsp;args)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Performs the actions specified in the invocation arguments.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.io.File</CODE></FONT></TD>
<TD><CODE><B><A HREF="../utilities/JarMaker.html#makeJar(java.io.File)">makeJar</A></B>(java.io.File&nbsp;sourceJarFile)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Generates a smaller JAR or ZIP file, containing only the desired entries
and their dependencies.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../utilities/JarMaker.html#makeJar(java.io.File, java.io.File)">makeJar</A></B>(java.io.File&nbsp;sourceJarFile,
java.io.File&nbsp;destinationJarFile)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Generates a smaller JAR or ZIP file, containing only the desired entries
and their dependencies.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../utilities/JarMaker.html#removeJarMakerListener(utilities.JarMakerListener)">removeJarMakerListener</A></B>(<A HREF="../utilities/JarMakerListener.html">JarMakerListener</A>&nbsp;listener)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes a listener from the listener list.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../utilities/JarMaker.html#reset()">reset</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Resets the JarMaker object to a clean, default state,
to facilitate object reuse.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../utilities/JarMaker.html#setAdditionalFiles(java.util.Vector)">setAdditionalFiles</A></B>(java.util.Vector&nbsp;fileList)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Specifies additional files to include in the destination JAR or ZIP file.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../utilities/JarMaker.html#setAdditionalFiles(java.util.Vector, java.io.File)">setAdditionalFiles</A></B>(java.util.Vector&nbsp;fileList,
java.io.File&nbsp;baseDirectory)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Specifies additional files to include in the destination JAR or ZIP file.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../utilities/JarMaker.html#setPackages(java.util.Vector)">setPackages</A></B>(java.util.Vector&nbsp;packages)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Specifies the names of packages that are to be included in the output.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../utilities/JarMaker.html#setRequiredFiles(java.util.Vector)">setRequiredFiles</A></B>(java.util.Vector&nbsp;entryList)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Specifies the names of required entries in the source JAR or ZIP file.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../utilities/JarMaker.html#setVerbose()">setVerbose</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets <code>verbose</code> mode 'on'.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../utilities/JarMaker.html#setVerbose(boolean)">setVerbose</A></B>(boolean&nbsp;verbose)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets <code>verbose</code> mode on or off.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.Vector</CODE></FONT></TD>
<TD><CODE><B><A HREF="../utilities/JarMaker.html#split(java.io.File)">split</A></B>(java.io.File&nbsp;sourceJarFile)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Splits the specified JAR or ZIP file into smaller JAR or ZIP files
whose size does not exceed 2 megabytes.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.Vector</CODE></FONT></TD>
<TD><CODE><B><A HREF="../utilities/JarMaker.html#split(java.io.File, int)">split</A></B>(java.io.File&nbsp;sourceJarFile,
int&nbsp;splitSizeKbytes)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Splits the specified source JAR or ZIP file into smaller JAR or ZIP files
whose size does not exceed the specified number of kilobytes.
</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ FIELD DETAIL =========== -->
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="JarMaker()"><!-- --></A><H3>
JarMaker</H3>
<PRE>
public <B>JarMaker</B>()</PRE>
<DL>
<DD>Constructs a JarMaker object.
<P>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="addJarMakerListener(utilities.JarMakerListener)"><!-- --></A><H3>
addJarMakerListener</H3>
<PRE>
public void <B>addJarMakerListener</B>(<A HREF="../utilities/JarMakerListener.html">JarMakerListener</A>&nbsp;listener)</PRE>
<DL>
<DD>Adds a listener to the listener list.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>listener</CODE> - The listener.</DL>
</DD>
</DL>
<HR>
<A NAME="extract(java.io.File)"><!-- --></A><H3>
extract</H3>
<PRE>
public java.io.File <B>extract</B>(java.io.File&nbsp;sourceJarFile)
throws java.io.FileNotFoundException,
java.io.IOException,
java.util.zip.ZipException</PRE>
<DL>
<DD>Extracts the desired entries and their dependencies from
the specified JAR or ZIP file.
The extracted files are placed under the current directory.
<br>Note: No "additional files" are copied.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>sourceJarFile</CODE> - The source JAR or ZIP file.
<DT><B>Returns:</B><DD>The base directory under which the extracted files were written.
<DT><B>Throws:</B>
<DD><CODE>java.io.FileNotFoundException</CODE> - If the source file does not exist.
<DD><CODE>java.io.IOException</CODE> - If an I/O error occurs when reading the source file
or writing the extracted files.
<DD><CODE>java.util.zip.ZipException</CODE> - If a ZIP error occurs when reading the source file.</DL>
</DD>
</DL>
<HR>
<A NAME="extract(java.io.File, java.io.File)"><!-- --></A><H3>
extract</H3>
<PRE>
public void <B>extract</B>(java.io.File&nbsp;sourceJarFile,
java.io.File&nbsp;outputDirectory)
throws java.io.FileNotFoundException,
java.io.IOException,
java.util.zip.ZipException</PRE>
<DL>
<DD>Extracts the desired entries and their dependencies from
the specified JAR or ZIP file.
<br>Note: No "additional files" are copied.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>sourceJarFile</CODE> - The source JAR or ZIP file.<DD><CODE>outputDirectory</CODE> - The directory under which to put the extracted files.
<DT><B>Throws:</B>
<DD><CODE>java.io.FileNotFoundException</CODE> - If the source file does not exist.
<DD><CODE>java.io.IOException</CODE> - If an I/O error occurs when reading the source file
or writing the extracted files.
<DD><CODE>java.util.zip.ZipException</CODE> - If a ZIP error occurs when reading the source file.</DL>
</DD>
</DL>
<HR>
<A NAME="getAdditionalFiles()"><!-- --></A><H3>
getAdditionalFiles</H3>
<PRE>
public java.util.Vector <B>getAdditionalFiles</B>()</PRE>
<DL>
<DD>Returns the additional files that are to be included in
the destination JAR or ZIP file.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>The additional files specified by the user.
The list will be empty if none has been specified.
The list will contain only <code>java.io.File</code> objects.</DL>
</DD>
</DL>
<HR>
<A NAME="getRequiredFiles()"><!-- --></A><H3>
getRequiredFiles</H3>
<PRE>
public java.util.Vector <B>getRequiredFiles</B>()</PRE>
<DL>
<DD>Returns the names of the required files specified by the user.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>The names of required files specified by the user.
The list will be empty if none has been specified.
The list will contain only <code>String</code> objects.</DL>
</DD>
</DL>
<HR>
<A NAME="getPackages()"><!-- --></A><H3>
getPackages</H3>
<PRE>
public java.util.Vector <B>getPackages</B>()</PRE>
<DL>
<DD>Returns the names of the packages that are to be included in the output.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>The names of the required packages specified by the user.
The list will be empty if none has been specified.
The list will contain only <code>String</code> objects.</DL>
</DD>
</DL>
<HR>
<A NAME="makeJar(java.io.File)"><!-- --></A><H3>
makeJar</H3>
<PRE>
public java.io.File <B>makeJar</B>(java.io.File&nbsp;sourceJarFile)
throws java.io.FileNotFoundException,
java.io.IOException,
java.util.zip.ZipException</PRE>
<DL>
<DD>Generates a smaller JAR or ZIP file, containing only the desired entries
and their dependencies.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>sourceJarFile</CODE> - The source JAR or ZIP file.
<DT><B>Returns:</B><DD>The destination JAR or ZIP file.
<DT><B>Throws:</B>
<DD><CODE>java.io.FileNotFoundException</CODE> - If the source file does not exist.
<DD><CODE>java.io.IOException</CODE> - If an I/O error occurs when reading the source file
or writing the destination file.
<DD><CODE>java.util.zip.ZipException</CODE> - If a ZIP error occurs when reading the source file
or writing the destination file.</DL>
</DD>
</DL>
<HR>
<A NAME="makeJar(java.io.File, java.io.File)"><!-- --></A><H3>
makeJar</H3>
<PRE>
public void <B>makeJar</B>(java.io.File&nbsp;sourceJarFile,
java.io.File&nbsp;destinationJarFile)
throws java.io.FileNotFoundException,
java.io.IOException,
java.util.zip.ZipException</PRE>
<DL>
<DD>Generates a smaller JAR or ZIP file, containing only the desired entries
and their dependencies.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>sourceJarFile</CODE> - The source JAR or ZIP file.<DD><CODE>destinationJarFile</CODE> - The destination JAR or ZIP file.
<DT><B>Throws:</B>
<DD><CODE>java.io.FileNotFoundException</CODE> - If the source file does not exist.
<DD><CODE>java.io.IOException</CODE> - If an I/O error occurs when reading the source file
or writing the destination file.
<DD><CODE>java.util.zip.ZipException</CODE> - If a ZIP error occurs when reading the source file
or writing the destination file.</DL>
</DD>
</DL>
<HR>
<A NAME="removeJarMakerListener(utilities.JarMakerListener)"><!-- --></A><H3>
removeJarMakerListener</H3>
<PRE>
public void <B>removeJarMakerListener</B>(<A HREF="../utilities/JarMakerListener.html">JarMakerListener</A>&nbsp;listener)</PRE>
<DL>
<DD>Removes a listener from the listener list.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>listener</CODE> - The listener.</DL>
</DD>
</DL>
<HR>
<A NAME="reset()"><!-- --></A><H3>
reset</H3>
<PRE>
public void <B>reset</B>()</PRE>
<DL>
<DD>Resets the JarMaker object to a clean, default state,
to facilitate object reuse.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setAdditionalFiles(java.util.Vector)"><!-- --></A><H3>
setAdditionalFiles</H3>
<PRE>
public void <B>setAdditionalFiles</B>(java.util.Vector&nbsp;fileList)</PRE>
<DL>
<DD>Specifies additional files to include in the destination JAR or ZIP file.
These are files that reside outside of the source JAR or ZIP file.
If an additional file resolves to the same entry name as an existing
entry in the source file, the additional file will replace the
existing entry in the generated JAR or ZIP file.
When deriving ZIP entry names,
the base directory for the files is the current directory.
<br>Note: This augments any previously specified additional files.
This method does not verify the existence of the specified files.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>fileList</CODE> - The additional files to include in the
destination JAR or ZIP file.
The list should contain only <code>java.io.File</code> objects.</DL>
</DD>
</DL>
<HR>
<A NAME="setAdditionalFiles(java.util.Vector, java.io.File)"><!-- --></A><H3>
setAdditionalFiles</H3>
<PRE>
public void <B>setAdditionalFiles</B>(java.util.Vector&nbsp;fileList,
java.io.File&nbsp;baseDirectory)</PRE>
<DL>
<DD>Specifies additional files to include in the destination JAR or ZIP file.
These are files that reside outside of the source JAR or ZIP file.
If an additional file resolves to the same entry name as an existing
entry in the source file, the additional file will replace the
existing entry in the generated JAR or ZIP file.
<br>Note: This augments any previously specified additional files.
This method does not verify the existence of the specified files or directory.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>fileList</CODE> - The additional files to include in the
destination JAR or ZIP file.
The list should contain only <code>java.io.File</code> objects.<DD><CODE>baseDirectory</CODE> - The base directory for the specifed files. This path
is used when assigning a ZIP entry name for the additional file.
<br>The path below this directory
should match the package name sequence for the files.
For example, if the additional file is
<code>C:\dir1\subdir2\com\ibm\myproduct\MyClass.class</code>,
and class <code>MyClass</code> is in package <code>com.ibm.myproduct</code>,
then the base directory should be set to <code>C:\dir1\subdir2</code>.</DL>
</DD>
</DL>
<HR>
<A NAME="setPackages(java.util.Vector)"><!-- --></A><H3>
setPackages</H3>
<PRE>
public void <B>setPackages</B>(java.util.Vector&nbsp;packages)</PRE>
<DL>
<DD>Specifies the names of packages that are to be included in the output.
Packages are specified in standard syntax, such as <code>com.ibm.component</code>.
The specified packages are simply included in the output.
No additional dependency analysis is done on the files in a package,
unless those files are also specified as required files.
<br>Note: This augments any previously specified packages.
This method does not verify the existence of the specified packages
in the source JAR or ZIP file.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>packages</CODE> - The required packages.
The list should contain only <code>String</code> objects.</DL>
</DD>
</DL>
<HR>
<A NAME="setRequiredFiles(java.util.Vector)"><!-- --></A><H3>
setRequiredFiles</H3>
<PRE>
public void <B>setRequiredFiles</B>(java.util.Vector&nbsp;entryList)</PRE>
<DL>
<DD>Specifies the names of required entries in the source JAR or ZIP file.
The names are specified in JAR entry name syntax, such as
<code>com/ibm/component/className.class</code>.
<br>Note: This augments any previously specified required entries.
This method does not verify the existence of the specified entries
in the source file.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>entryList</CODE> - The names of required JAR or ZIP entries.
The list should contain only <code>String</code> objects.</DL>
</DD>
</DL>
<HR>
<A NAME="setVerbose()"><!-- --></A><H3>
setVerbose</H3>
<PRE>
public void <B>setVerbose</B>()</PRE>
<DL>
<DD>Sets <code>verbose</code> mode 'on'.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setVerbose(boolean)"><!-- --></A><H3>
setVerbose</H3>
<PRE>
public void <B>setVerbose</B>(boolean&nbsp;verbose)</PRE>
<DL>
<DD>Sets <code>verbose</code> mode on or off.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>verbose</CODE> - If <code>true</code>, turn verbose mode on;
otherwise turn verbose mode off.</DL>
</DD>
</DL>
<HR>
<A NAME="split(java.io.File)"><!-- --></A><H3>
split</H3>
<PRE>
public java.util.Vector <B>split</B>(java.io.File&nbsp;sourceJarFile)
throws java.io.FileNotFoundException,
java.io.IOException,
java.util.zip.ZipException</PRE>
<DL>
<DD>Splits the specified JAR or ZIP file into smaller JAR or ZIP files
whose size does not exceed 2 megabytes.
No files are added or excluded; the entries in the source file
are simply distributed among the generated JAR or ZIP files.
If any single file within the source JAR or ZIP file exceeds
2 megabytes, a warning is printed to <code>System.err</code>.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>sourceJarFile</CODE> - The source JAR or ZIP file.
<DT><B>Returns:</B><DD>The generated files.
This is a list of <code>java.io.File</code> objects.
<DT><B>Throws:</B>
<DD><CODE>java.io.FileNotFoundException</CODE> - If the source file does not exist.
<DD><CODE>java.io.IOException</CODE> - If an I/O error occurs when reading the source file
or writing a generated file.
<DD><CODE>java.util.zip.ZipException</CODE> - If a ZIP error occurs when reading the source file
or writing a generated file.</DL>
</DD>
</DL>
<HR>
<A NAME="split(java.io.File, int)"><!-- --></A><H3>
split</H3>
<PRE>
public java.util.Vector <B>split</B>(java.io.File&nbsp;sourceJarFile,
int&nbsp;splitSizeKbytes)
throws java.io.FileNotFoundException,
java.io.IOException,
java.util.zip.ZipException</PRE>
<DL>
<DD>Splits the specified source JAR or ZIP file into smaller JAR or ZIP files
whose size does not exceed the specified number of kilobytes.
No files are added or excluded; the entries in the source file
are simply distributed among the destination files.
If any single file within the source file exceeds
the specified size, a warning is printed to <code>System.err</code>.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>sourceJarFile</CODE> - The source JAR or ZIP file.<DD><CODE>splitSizeKbytes</CODE> - The maximum size for the generated JAR or ZIP files
(in kilobytes). Must be greater than zero.
<DT><B>Returns:</B><DD>The generated files.
This is a list of <code>java.io.File</code> objects.
<DT><B>Throws:</B>
<DD><CODE>java.io.FileNotFoundException</CODE> - If the source file does not exist.
<DD><CODE>java.io.IOException</CODE> - If an I/O error occurs when reading the source file
or writing a generated file.
<DD><CODE>java.util.zip.ZipException</CODE> - If a ZIP error occurs when reading the source file
or writing a generated file.</DL>
</DD>
</DL>
<HR>
<A NAME="main(java.lang.String[])"><!-- --></A><H3>
main</H3>
<PRE>
public static void <B>main</B>(java.lang.String[]&nbsp;args)</PRE>
<DL>
<DD>Performs the actions specified in the invocation arguments.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>args</CODE> - The command line arguments.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../utilities/AS400ToolboxJarMaker.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../utilities/JarMakerEvent.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../index.html" TARGET="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="JarMaker.html" TARGET="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;
<SCRIPT>
<!--
if(window==top) {
document.writeln('<A HREF="../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
</BODY>
</HTML>