package-summary.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!-- NewPage -->
  3. <html lang="de">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  6. <title>org.apache.commons.compress.compressors.pack200 (Apache Commons Compress 1.13 API)</title>
  7. <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
  8. </head>
  9. <body>
  10. <script type="text/javascript"><!--
  11. try {
  12. if (location.href.indexOf('is-external=true') == -1) {
  13. parent.document.title="org.apache.commons.compress.compressors.pack200 (Apache Commons Compress 1.13 API)";
  14. }
  15. }
  16. catch(err) {
  17. }
  18. //-->
  19. </script>
  20. <noscript>
  21. <div>JavaScript is disabled on your browser.</div>
  22. </noscript>
  23. <!-- ========= START OF TOP NAVBAR ======= -->
  24. <div class="topNav"><a name="navbar_top">
  25. <!-- -->
  26. </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
  27. <!-- -->
  28. </a>
  29. <ul class="navList" title="Navigation">
  30. <li><a href="../../../../../../overview-summary.html">Overview</a></li>
  31. <li class="navBarCell1Rev">Package</li>
  32. <li>Class</li>
  33. <li><a href="package-use.html">Use</a></li>
  34. <li><a href="package-tree.html">Tree</a></li>
  35. <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
  36. <li><a href="../../../../../../index-all.html">Index</a></li>
  37. <li><a href="../../../../../../help-doc.html">Help</a></li>
  38. </ul>
  39. </div>
  40. <div class="subNav">
  41. <ul class="navList">
  42. <li><a href="../../../../../../org/apache/commons/compress/compressors/lzw/package-summary.html">Prev Package</a></li>
  43. <li><a href="../../../../../../org/apache/commons/compress/compressors/snappy/package-summary.html">Next Package</a></li>
  44. </ul>
  45. <ul class="navList">
  46. <li><a href="../../../../../../index.html?org/apache/commons/compress/compressors/pack200/package-summary.html" target="_top">Frames</a></li>
  47. <li><a href="package-summary.html" target="_top">No Frames</a></li>
  48. </ul>
  49. <ul class="navList" id="allclasses_navbar_top">
  50. <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
  51. </ul>
  52. <div>
  53. <script type="text/javascript"><!--
  54. allClassesLink = document.getElementById("allclasses_navbar_top");
  55. if(window==top) {
  56. allClassesLink.style.display = "block";
  57. }
  58. else {
  59. allClassesLink.style.display = "none";
  60. }
  61. //-->
  62. </script>
  63. </div>
  64. <a name="skip-navbar_top">
  65. <!-- -->
  66. </a></div>
  67. <!-- ========= END OF TOP NAVBAR ========= -->
  68. <div class="header">
  69. <h1 title="Package" class="title">Package&nbsp;org.apache.commons.compress.compressors.pack200</h1>
  70. <div class="docSummary">
  71. <div class="block">Provides stream classes for compressing and decompressing
  72. streams using the Pack200 algorithm used to compress Java
  73. archives.</div>
  74. </div>
  75. <p>See:&nbsp;<a href="#package_description">Description</a></p>
  76. </div>
  77. <div class="contentContainer">
  78. <ul class="blockList">
  79. <li class="blockList">
  80. <table class="packageSummary" border="0" cellpadding="3" cellspacing="0" summary="Class Summary table, listing classes, and an explanation">
  81. <caption><span>Class Summary</span><span class="tabEnd">&nbsp;</span></caption>
  82. <tr>
  83. <th class="colFirst" scope="col">Class</th>
  84. <th class="colLast" scope="col">Description</th>
  85. </tr>
  86. <tbody>
  87. <tr class="altColor">
  88. <td class="colFirst"><a href="../../../../../../org/apache/commons/compress/compressors/pack200/Pack200CompressorInputStream.html" title="class in org.apache.commons.compress.compressors.pack200">Pack200CompressorInputStream</a></td>
  89. <td class="colLast">
  90. <div class="block">An input stream that decompresses from the Pack200 format to be read
  91. as any other stream.</div>
  92. </td>
  93. </tr>
  94. <tr class="rowColor">
  95. <td class="colFirst"><a href="../../../../../../org/apache/commons/compress/compressors/pack200/Pack200CompressorOutputStream.html" title="class in org.apache.commons.compress.compressors.pack200">Pack200CompressorOutputStream</a></td>
  96. <td class="colLast">
  97. <div class="block">An output stream that compresses using the Pack200 format.</div>
  98. </td>
  99. </tr>
  100. <tr class="altColor">
  101. <td class="colFirst"><a href="../../../../../../org/apache/commons/compress/compressors/pack200/Pack200Utils.html" title="class in org.apache.commons.compress.compressors.pack200">Pack200Utils</a></td>
  102. <td class="colLast">
  103. <div class="block">Utility methods for Pack200.</div>
  104. </td>
  105. </tr>
  106. </tbody>
  107. </table>
  108. </li>
  109. <li class="blockList">
  110. <table class="packageSummary" border="0" cellpadding="3" cellspacing="0" summary="Enum Summary table, listing enums, and an explanation">
  111. <caption><span>Enum Summary</span><span class="tabEnd">&nbsp;</span></caption>
  112. <tr>
  113. <th class="colFirst" scope="col">Enum</th>
  114. <th class="colLast" scope="col">Description</th>
  115. </tr>
  116. <tbody>
  117. <tr class="altColor">
  118. <td class="colFirst"><a href="../../../../../../org/apache/commons/compress/compressors/pack200/Pack200Strategy.html" title="enum in org.apache.commons.compress.compressors.pack200">Pack200Strategy</a></td>
  119. <td class="colLast">
  120. <div class="block">The different modes the Pack200 streams can use to wrap input and
  121. output.</div>
  122. </td>
  123. </tr>
  124. </tbody>
  125. </table>
  126. </li>
  127. </ul>
  128. <a name="package_description">
  129. <!-- -->
  130. </a>
  131. <h2 title="Package org.apache.commons.compress.compressors.pack200 Description">Package org.apache.commons.compress.compressors.pack200 Description</h2>
  132. <div class="block"><p>Provides stream classes for compressing and decompressing
  133. streams using the Pack200 algorithm used to compress Java
  134. archives.</p>
  135. <p>The streams of this package only work on JAR archives, i.e. a
  136. <a href="../../../../../../org/apache/commons/compress/compressors/pack200/Pack200CompressorOutputStream.html" title="class in org.apache.commons.compress.compressors.pack200"><code>Pack200CompressorOutputStream</code></a> expects to be wrapped around a
  137. stream that a valid JAR archive will be written to and a <a href="../../../../../../org/apache/commons/compress/compressors/pack200/Pack200CompressorInputStream.html" title="class in org.apache.commons.compress.compressors.pack200"><code>Pack200CompressorInputStream</code></a> provides a stream to read from a
  138. JAR archive.</p>
  139. <p>JAR archives compressed with Pack200 will in general be
  140. different from the original archive when decompressed again.
  141. For details see
  142. the <a href="http://download.oracle.com/javase/1.5.0/docs/api/java/util/jar/Pack200.html">API
  143. documentation of Pack200</a>.</p>
  144. <p>The streams of this package work on non-deflated streams,
  145. i.e. archives like those created with the <code>--no-gzip</code>
  146. option of the JDK's <code>pack200</code> command line tool. If
  147. you want to work on deflated streams you must use an additional
  148. stream layer - for example by using Apache Commons Compress'
  149. gzip package.</p>
  150. <p>The Pack200 API provided by the Java class library doesn't lend
  151. itself to real stream
  152. processing. <code>Pack200CompressorInputStream</code> will
  153. uncompress its input immediately and then provide
  154. an <code>InputStream</code> to a cached result.
  155. Likewise <code>Pack200CompressorOutputStream</code> will not
  156. write anything to the given OutputStream
  157. until <code>finish</code> or <code>close</code> is called - at
  158. which point the cached output written so far gets
  159. compressed.</p>
  160. <p>Two different caching modes are available - "in memory", which
  161. is the default, and "temporary file". By default data is cached
  162. in memory but you should switch to the temporary file option if
  163. your archives are really big.</p>
  164. <p>Given there always is an intermediate result
  165. the <code>getBytesRead</code> and <code>getCount</code> methods
  166. of <code>Pack200CompressorInputStream</code> are meaningless
  167. (read from the real stream or from the intermediate result?)
  168. and always return 0.</p>
  169. <p>During development of the initial version several attempts have
  170. been made to use a real streaming API based for example
  171. on <code>Piped(In|Out)putStream</code> or explicit stream
  172. pumping like Commons Exec's <code>InputStreamPumper</code> but
  173. they have all failed because they rely on the output end to be
  174. consumed completely or else the <code>(un)pack</code> will block
  175. forever. Especially for <code>Pack200InputStream</code> it is
  176. very likely that it will be wrapped in
  177. a <code>ZipArchiveInputStream</code> which will never read the
  178. archive completely as it is not interested in the ZIP central
  179. directory data at the end of the JAR archive.</p></div>
  180. </div>
  181. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  182. <div class="bottomNav"><a name="navbar_bottom">
  183. <!-- -->
  184. </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
  185. <!-- -->
  186. </a>
  187. <ul class="navList" title="Navigation">
  188. <li><a href="../../../../../../overview-summary.html">Overview</a></li>
  189. <li class="navBarCell1Rev">Package</li>
  190. <li>Class</li>
  191. <li><a href="package-use.html">Use</a></li>
  192. <li><a href="package-tree.html">Tree</a></li>
  193. <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
  194. <li><a href="../../../../../../index-all.html">Index</a></li>
  195. <li><a href="../../../../../../help-doc.html">Help</a></li>
  196. </ul>
  197. </div>
  198. <div class="subNav">
  199. <ul class="navList">
  200. <li><a href="../../../../../../org/apache/commons/compress/compressors/lzw/package-summary.html">Prev Package</a></li>
  201. <li><a href="../../../../../../org/apache/commons/compress/compressors/snappy/package-summary.html">Next Package</a></li>
  202. </ul>
  203. <ul class="navList">
  204. <li><a href="../../../../../../index.html?org/apache/commons/compress/compressors/pack200/package-summary.html" target="_top">Frames</a></li>
  205. <li><a href="package-summary.html" target="_top">No Frames</a></li>
  206. </ul>
  207. <ul class="navList" id="allclasses_navbar_bottom">
  208. <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
  209. </ul>
  210. <div>
  211. <script type="text/javascript"><!--
  212. allClassesLink = document.getElementById("allclasses_navbar_bottom");
  213. if(window==top) {
  214. allClassesLink.style.display = "block";
  215. }
  216. else {
  217. allClassesLink.style.display = "none";
  218. }
  219. //-->
  220. </script>
  221. </div>
  222. <a name="skip-navbar_bottom">
  223. <!-- -->
  224. </a></div>
  225. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  226. <p class="legalCopy"><small>Copyright &#169; 2016 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
  227. </body>
  228. </html>