LZMAUtils.html 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337
  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>LZMAUtils (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="LZMAUtils (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><a href="package-summary.html">Package</a></li>
  32. <li class="navBarCell1Rev">Class</li>
  33. <li><a href="class-use/LZMAUtils.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/lzma/LZMACompressorOutputStream.html" title="class in org.apache.commons.compress.compressors.lzma"><span class="strong">Prev Class</span></a></li>
  43. <li>Next Class</li>
  44. </ul>
  45. <ul class="navList">
  46. <li><a href="../../../../../../index.html?org/apache/commons/compress/compressors/lzma/LZMAUtils.html" target="_top">Frames</a></li>
  47. <li><a href="LZMAUtils.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. <div>
  65. <ul class="subNavList">
  66. <li>Summary:&nbsp;</li>
  67. <li>Nested&nbsp;|&nbsp;</li>
  68. <li>Field&nbsp;|&nbsp;</li>
  69. <li>Constr&nbsp;|&nbsp;</li>
  70. <li><a href="#method_summary">Method</a></li>
  71. </ul>
  72. <ul class="subNavList">
  73. <li>Detail:&nbsp;</li>
  74. <li>Field&nbsp;|&nbsp;</li>
  75. <li>Constr&nbsp;|&nbsp;</li>
  76. <li><a href="#method_detail">Method</a></li>
  77. </ul>
  78. </div>
  79. <a name="skip-navbar_top">
  80. <!-- -->
  81. </a></div>
  82. <!-- ========= END OF TOP NAVBAR ========= -->
  83. <!-- ======== START OF CLASS DATA ======== -->
  84. <div class="header">
  85. <div class="subTitle">org.apache.commons.compress.compressors.lzma</div>
  86. <h2 title="Class LZMAUtils" class="title">Class LZMAUtils</h2>
  87. </div>
  88. <div class="contentContainer">
  89. <ul class="inheritance">
  90. <li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
  91. <li>
  92. <ul class="inheritance">
  93. <li>org.apache.commons.compress.compressors.lzma.LZMAUtils</li>
  94. </ul>
  95. </li>
  96. </ul>
  97. <div class="description">
  98. <ul class="blockList">
  99. <li class="blockList">
  100. <hr>
  101. <br>
  102. <pre>public class <a href="../../../../../../src-html/org/apache/commons/compress/compressors/lzma/LZMAUtils.html#line.30">LZMAUtils</a>
  103. extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
  104. <div class="block">Utility code for the lzma compression format.</div>
  105. <dl><dt><span class="strong">Since:</span></dt>
  106. <dd>1.10</dd>
  107. <dt><span class="strong">This class is thread-safe</span></dt>
  108. <dd></dd></dl>
  109. </li>
  110. </ul>
  111. </div>
  112. <div class="summary">
  113. <ul class="blockList">
  114. <li class="blockList">
  115. <!-- ========== METHOD SUMMARY =========== -->
  116. <ul class="blockList">
  117. <li class="blockList"><a name="method_summary">
  118. <!-- -->
  119. </a>
  120. <h3>Method Summary</h3>
  121. <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
  122. <caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
  123. <tr>
  124. <th class="colFirst" scope="col">Modifier and Type</th>
  125. <th class="colLast" scope="col">Method and Description</th>
  126. </tr>
  127. <tr class="altColor">
  128. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
  129. <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/compressors/lzma/LZMAUtils.html#getCompressedFilename(java.lang.String)">getCompressedFilename</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;filename)</code>
  130. <div class="block">Maps the given filename to the name that the file should have after
  131. compression with lzma.</div>
  132. </td>
  133. </tr>
  134. <tr class="rowColor">
  135. <td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
  136. <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/compressors/lzma/LZMAUtils.html#getUncompressedFilename(java.lang.String)">getUncompressedFilename</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;filename)</code>
  137. <div class="block">Maps the given name of a lzma-compressed file to the name that
  138. the file should have after uncompression.</div>
  139. </td>
  140. </tr>
  141. <tr class="altColor">
  142. <td class="colFirst"><code>static boolean</code></td>
  143. <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/compressors/lzma/LZMAUtils.html#isCompressedFilename(java.lang.String)">isCompressedFilename</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;filename)</code>
  144. <div class="block">Detects common lzma suffixes in the given filename.</div>
  145. </td>
  146. </tr>
  147. <tr class="rowColor">
  148. <td class="colFirst"><code>static boolean</code></td>
  149. <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/compressors/lzma/LZMAUtils.html#isLZMACompressionAvailable()">isLZMACompressionAvailable</a></strong>()</code>
  150. <div class="block">Are the classes required to support LZMA compression available?</div>
  151. </td>
  152. </tr>
  153. <tr class="altColor">
  154. <td class="colFirst"><code>static boolean</code></td>
  155. <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/compressors/lzma/LZMAUtils.html#matches(byte[],%20int)">matches</a></strong>(byte[]&nbsp;signature,
  156. int&nbsp;length)</code>
  157. <div class="block">Checks if the signature matches what is expected for a .lzma file.</div>
  158. </td>
  159. </tr>
  160. <tr class="rowColor">
  161. <td class="colFirst"><code>static void</code></td>
  162. <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/compressors/lzma/LZMAUtils.html#setCacheLZMAAvailablity(boolean)">setCacheLZMAAvailablity</a></strong>(boolean&nbsp;doCache)</code>
  163. <div class="block">Whether to cache the result of the LZMA check.</div>
  164. </td>
  165. </tr>
  166. </table>
  167. <ul class="blockList">
  168. <li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
  169. <!-- -->
  170. </a>
  171. <h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
  172. <code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long,%20int)" title="class or interface in java.lang">wait</a></code></li>
  173. </ul>
  174. </li>
  175. </ul>
  176. </li>
  177. </ul>
  178. </div>
  179. <div class="details">
  180. <ul class="blockList">
  181. <li class="blockList">
  182. <!-- ============ METHOD DETAIL ========== -->
  183. <ul class="blockList">
  184. <li class="blockList"><a name="method_detail">
  185. <!-- -->
  186. </a>
  187. <h3>Method Detail</h3>
  188. <a name="matches(byte[], int)">
  189. <!-- -->
  190. </a>
  191. <ul class="blockList">
  192. <li class="blockList">
  193. <h4>matches</h4>
  194. <pre>public static&nbsp;boolean&nbsp;<a href="../../../../../../src-html/org/apache/commons/compress/compressors/lzma/LZMAUtils.html#line.71">matches</a>(byte[]&nbsp;signature,
  195. int&nbsp;length)</pre>
  196. <div class="block">Checks if the signature matches what is expected for a .lzma file.</div>
  197. <dl><dt><span class="strong">Parameters:</span></dt><dd><code>signature</code> - the bytes to check</dd><dd><code>length</code> - the number of bytes to check</dd>
  198. <dt><span class="strong">Returns:</span></dt><dd>true if signature matches the .lzma magic bytes, false otherwise</dd></dl>
  199. </li>
  200. </ul>
  201. <a name="isLZMACompressionAvailable()">
  202. <!-- -->
  203. </a>
  204. <ul class="blockList">
  205. <li class="blockList">
  206. <h4>isLZMACompressionAvailable</h4>
  207. <pre>public static&nbsp;boolean&nbsp;<a href="../../../../../../src-html/org/apache/commons/compress/compressors/lzma/LZMAUtils.html#line.90">isLZMACompressionAvailable</a>()</pre>
  208. <div class="block">Are the classes required to support LZMA compression available?</div>
  209. <dl><dt><span class="strong">Returns:</span></dt><dd>true if the classes required to support LZMA
  210. compression are available</dd></dl>
  211. </li>
  212. </ul>
  213. <a name="isCompressedFilename(java.lang.String)">
  214. <!-- -->
  215. </a>
  216. <ul class="blockList">
  217. <li class="blockList">
  218. <h4>isCompressedFilename</h4>
  219. <pre>public static&nbsp;boolean&nbsp;<a href="../../../../../../src-html/org/apache/commons/compress/compressors/lzma/LZMAUtils.html#line.114">isCompressedFilename</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;filename)</pre>
  220. <div class="block">Detects common lzma suffixes in the given filename.</div>
  221. <dl><dt><span class="strong">Parameters:</span></dt><dd><code>filename</code> - name of a file</dd>
  222. <dt><span class="strong">Returns:</span></dt><dd><code>true</code> if the filename has a common lzma suffix,
  223. <code>false</code> otherwise</dd></dl>
  224. </li>
  225. </ul>
  226. <a name="getUncompressedFilename(java.lang.String)">
  227. <!-- -->
  228. </a>
  229. <ul class="blockList">
  230. <li class="blockList">
  231. <h4>getUncompressedFilename</h4>
  232. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;<a href="../../../../../../src-html/org/apache/commons/compress/compressors/lzma/LZMAUtils.html#line.128">getUncompressedFilename</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;filename)</pre>
  233. <div class="block">Maps the given name of a lzma-compressed file to the name that
  234. the file should have after uncompression. Any filenames with
  235. the generic ".lzma" suffix (or any other generic lzma suffix)
  236. is mapped to a name without that suffix. If no lzma suffix is
  237. detected, then the filename is returned unmapped.</div>
  238. <dl><dt><span class="strong">Parameters:</span></dt><dd><code>filename</code> - name of a file</dd>
  239. <dt><span class="strong">Returns:</span></dt><dd>name of the corresponding uncompressed file</dd></dl>
  240. </li>
  241. </ul>
  242. <a name="getCompressedFilename(java.lang.String)">
  243. <!-- -->
  244. </a>
  245. <ul class="blockList">
  246. <li class="blockList">
  247. <h4>getCompressedFilename</h4>
  248. <pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;<a href="../../../../../../src-html/org/apache/commons/compress/compressors/lzma/LZMAUtils.html#line.139">getCompressedFilename</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;filename)</pre>
  249. <div class="block">Maps the given filename to the name that the file should have after
  250. compression with lzma.</div>
  251. <dl><dt><span class="strong">Parameters:</span></dt><dd><code>filename</code> - name of a file</dd>
  252. <dt><span class="strong">Returns:</span></dt><dd>name of the corresponding compressed file</dd></dl>
  253. </li>
  254. </ul>
  255. <a name="setCacheLZMAAvailablity(boolean)">
  256. <!-- -->
  257. </a>
  258. <ul class="blockListLast">
  259. <li class="blockList">
  260. <h4>setCacheLZMAAvailablity</h4>
  261. <pre>public static&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/commons/compress/compressors/lzma/LZMAUtils.html#line.149">setCacheLZMAAvailablity</a>(boolean&nbsp;doCache)</pre>
  262. <div class="block">Whether to cache the result of the LZMA check.
  263. <p>This defaults to <code>false</code> in an OSGi environment and <code>true</code> otherwise.</p></div>
  264. <dl><dt><span class="strong">Parameters:</span></dt><dd><code>doCache</code> - whether to cache the result</dd></dl>
  265. </li>
  266. </ul>
  267. </li>
  268. </ul>
  269. </li>
  270. </ul>
  271. </div>
  272. </div>
  273. <!-- ========= END OF CLASS DATA ========= -->
  274. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  275. <div class="bottomNav"><a name="navbar_bottom">
  276. <!-- -->
  277. </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
  278. <!-- -->
  279. </a>
  280. <ul class="navList" title="Navigation">
  281. <li><a href="../../../../../../overview-summary.html">Overview</a></li>
  282. <li><a href="package-summary.html">Package</a></li>
  283. <li class="navBarCell1Rev">Class</li>
  284. <li><a href="class-use/LZMAUtils.html">Use</a></li>
  285. <li><a href="package-tree.html">Tree</a></li>
  286. <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
  287. <li><a href="../../../../../../index-all.html">Index</a></li>
  288. <li><a href="../../../../../../help-doc.html">Help</a></li>
  289. </ul>
  290. </div>
  291. <div class="subNav">
  292. <ul class="navList">
  293. <li><a href="../../../../../../org/apache/commons/compress/compressors/lzma/LZMACompressorOutputStream.html" title="class in org.apache.commons.compress.compressors.lzma"><span class="strong">Prev Class</span></a></li>
  294. <li>Next Class</li>
  295. </ul>
  296. <ul class="navList">
  297. <li><a href="../../../../../../index.html?org/apache/commons/compress/compressors/lzma/LZMAUtils.html" target="_top">Frames</a></li>
  298. <li><a href="LZMAUtils.html" target="_top">No Frames</a></li>
  299. </ul>
  300. <ul class="navList" id="allclasses_navbar_bottom">
  301. <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
  302. </ul>
  303. <div>
  304. <script type="text/javascript"><!--
  305. allClassesLink = document.getElementById("allclasses_navbar_bottom");
  306. if(window==top) {
  307. allClassesLink.style.display = "block";
  308. }
  309. else {
  310. allClassesLink.style.display = "none";
  311. }
  312. //-->
  313. </script>
  314. </div>
  315. <div>
  316. <ul class="subNavList">
  317. <li>Summary:&nbsp;</li>
  318. <li>Nested&nbsp;|&nbsp;</li>
  319. <li>Field&nbsp;|&nbsp;</li>
  320. <li>Constr&nbsp;|&nbsp;</li>
  321. <li><a href="#method_summary">Method</a></li>
  322. </ul>
  323. <ul class="subNavList">
  324. <li>Detail:&nbsp;</li>
  325. <li>Field&nbsp;|&nbsp;</li>
  326. <li>Constr&nbsp;|&nbsp;</li>
  327. <li><a href="#method_detail">Method</a></li>
  328. </ul>
  329. </div>
  330. <a name="skip-navbar_bottom">
  331. <!-- -->
  332. </a></div>
  333. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  334. <p class="legalCopy"><small>Copyright &#169; 2016 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
  335. </body>
  336. </html>