< prev index next >

src/java.base/share/classes/com/sun/java/util/jar/pack/package-info.java

Print this page


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



< prev index next >