jdk/src/share/classes/com/sun/java/util/jar/pack/package.html
author ohair
Wed, 26 May 2010 20:28:04 -0700
changeset 5551 327690766109
parent 5506 202f599c92aa
child 9266 121fb370f179
permissions -rw-r--r--
6956202: Fix a few missed rebranding issues, please contact lines etc. Reviewed-by: jjg, darcy, weijun
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
90ce3da70b43 Initial load
duke
parents:
diff changeset
     2
<html>
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
<head>
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
<!--
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     6
Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    11
published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    13
by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
90ce3da70b43 Initial load
duke
parents:
diff changeset
    21
You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
5551
327690766109 6956202: Fix a few missed rebranding issues, please contact lines etc.
ohair
parents: 5506
diff changeset
    25
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
327690766109 6956202: Fix a few missed rebranding issues, please contact lines etc.
ohair
parents: 5506
diff changeset
    26
or visit www.oracle.com if you need additional information or have any
327690766109 6956202: Fix a few missed rebranding issues, please contact lines etc.
ohair
parents: 5506
diff changeset
    27
questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
-->
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
</head>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
<body bgcolor="white">
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
<p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
This package provides methods to read files from a JAR file and
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
to transform them to a more compact transfer format called Pack200.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
It also provides methods to receive the transmitted data and expand
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
it into a JAR file equivalent to the original JAR file.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
<p> 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
The <tt>pack</tt> methods may be used by application developers
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
who wish to deploy large JARs on the web.  The <tt>unpack</tt> methods may be used 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
by deployment applications such as Java Web Start and Java Plugin.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
<p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
In typical use, the packed output should be further compressed using
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
a suitable tool such as gzip or <tt>java.util.zip.GZIPOutputStream</tt>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
The resulting file (with a suffix ".pack.gz") should be hosted on a HTTP/1.1
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
compliant server, which will be capable of handling "Accept-Encoding",
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
as specified by the HTTP 1.1 RFC2616 specification.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
<p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
<b>NOTE:</b> It is recommended that the original ".jar" file be hosted
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
in addition to the ".pack.gz" file, so that older client implementations
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
will continue to work reliably.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
(On-demand compression by the server is not recommended.)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
<p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
When a client application requests a ".jar" file (call it "Large.jar"),
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
the client will transmit the  headers
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
"Content-Type=application/x-java-archive" as well as "Accept-Encoding=pack200-gzip".
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
This indicates to the server that the client application desires an version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
of the file encoded with Pack200 and further compressed with gzip.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
<p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
The server implementation will typically check for the existence of "Large.pack.gz".
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
If that file is available, the server will transmit it with the headers
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
"Content-Encoding=pack200-gzip" and "Content-Type=application/x-java-archive". 
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
<p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
If the ".pack.gz" file, is not available, then the server will transmit
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
the original ".jar"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
with "Content-Encoding=null" and "Content-Type=application/x-java-archive".
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
<p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
A MIME type of "application/x-java-pack200" may be specified by the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
client application to indicate a ".pack" file is required.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
However, this has limited capability, and is not recommended.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
<h2> Package Specification</h2>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
Network Transfer Format Specification :<a href="http://jcp.org/en/jsr/detail?id=200">
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
http://jcp.org/en/jsr/detail?id=200</a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
<h2> Related Documentation</h2>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
For overviews, tutorials, examples, guides, and tool documentation, please
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
see:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
<ul>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
<li>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
Jar File Specification :<a href="http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html">
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html</a></li>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
<li>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
Java Virtual Machine Specification : <a href="http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html">
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html</a></li>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
<li>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
Hypertext Transfer Protocol -- HTTP/1.1 : <a href="http://www.ietf.org/rfc/rfc2616.txt">
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
http://www.ietf.org/rfc/rfc2616.txt
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
</ul>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
<li>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
@since JDK1.5.0</li>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
<br><!-- Put @see and @since tags down here. -->
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
</body>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
</html>