0N/A<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
0N/A<html>
0N/A<head>
0N/A<!--
0N/A
2362N/ACopyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
0N/ADO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A
0N/AThis code is free software; you can redistribute it and/or modify it
0N/Aunder the terms of the GNU General Public License version 2 only, as
2362N/Apublished by the Free Software Foundation. Oracle designates this
0N/Aparticular file as subject to the "Classpath" exception as provided
2362N/Aby Oracle in the LICENSE file that accompanied this code.
0N/A
0N/AThis code is distributed in the hope that it will be useful, but WITHOUT
0N/AANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/AFITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/Aversion 2 for more details (a copy is included in the LICENSE file that
0N/Aaccompanied this code).
0N/A
0N/AYou should have received a copy of the GNU General Public License version
0N/A2 along with this work; if not, write to the Free Software Foundation,
0N/AInc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A
2365N/APlease contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2365N/Aor visit www.oracle.com if you need additional information or have any
2365N/Aquestions.
0N/A-->
0N/A</head>
0N/A<body bgcolor="white">
0N/A<p>
0N/AThis package provides methods to read files from a JAR file and
0N/Ato transform them to a more compact transfer format called Pack200.
0N/AIt also provides methods to receive the transmitted data and expand
0N/Ait into a JAR file equivalent to the original JAR file.
0N/A
0N/A<p>
0N/AThe <tt>pack</tt> methods may be used by application developers
0N/Awho wish to deploy large JARs on the web. The <tt>unpack</tt> methods may be used
0N/Aby deployment applications such as Java Web Start and Java Plugin.
0N/A
0N/A<p>
0N/AIn typical use, the packed output should be further compressed using
0N/Aa suitable tool such as gzip or <tt>java.util.zip.GZIPOutputStream</tt>.
0N/AThe resulting file (with a suffix ".pack.gz") should be hosted on a HTTP/1.1
0N/Acompliant server, which will be capable of handling "Accept-Encoding",
0N/Aas specified by the HTTP 1.1 RFC2616 specification.
0N/A
0N/A<p>
0N/A<b>NOTE:</b> It is recommended that the original ".jar" file be hosted
0N/Ain addition to the ".pack.gz" file, so that older client implementations
0N/Awill continue to work reliably.
0N/A(On-demand compression by the server is not recommended.)
0N/A
0N/A<p>
0N/AWhen a client application requests a ".jar" file (call it "Large.jar"),
0N/Athe client will transmit the headers
0N/A"Content-Type=application/x-java-archive" as well as "Accept-Encoding=pack200-gzip".
0N/AThis indicates to the server that the client application desires an version
0N/Aof the file encoded with Pack200 and further compressed with gzip.
0N/A
0N/A<p>
0N/AThe server implementation will typically check for the existence of "Large.pack.gz".
0N/AIf that file is available, the server will transmit it with the headers
0N/A"Content-Encoding=pack200-gzip" and "Content-Type=application/x-java-archive".
0N/A
0N/A<p>
0N/AIf the ".pack.gz" file, is not available, then the server will transmit
0N/Athe original ".jar"
0N/Awith "Content-Encoding=null" and "Content-Type=application/x-java-archive".
0N/A
0N/A<p>
0N/AA MIME type of "application/x-java-pack200" may be specified by the
0N/Aclient application to indicate a ".pack" file is required.
0N/AHowever, this has limited capability, and is not recommended.
0N/A
0N/A<h2> Package Specification</h2>
0N/ANetwork Transfer Format Specification :<a href="http://jcp.org/en/jsr/detail?id=200">
0N/Ahttp://jcp.org/en/jsr/detail?id=200</a>
0N/A
0N/A<h2> Related Documentation</h2>
0N/AFor overviews, tutorials, examples, guides, and tool documentation, please
0N/Asee:
0N/A<ul>
0N/A
0N/A<li>
0N/AJar File Specification :<a href="http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html">
0N/Ahttp://java.sun.com/j2se/1.3/docs/guide/jar/jar.html</a></li>
0N/A
0N/A<li>
4008N/AClass File Specification: Chapter 4 of
4008N/A<em>The Java&trade; Virtual Machine Specification</em>
0N/A
0N/A<li>
0N/AHypertext Transfer Protocol -- HTTP/1.1 : <a href="http://www.ietf.org/rfc/rfc2616.txt">
0N/Ahttp://www.ietf.org/rfc/rfc2616.txt
0N/A</ul>
0N/A
0N/A<li>
0N/A@since JDK1.5.0</li>
0N/A
0N/A<br><!-- Put @see and @since tags down here. -->
0N/A</body>
0N/A</html>