ZipFile.html 54 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780
  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>ZipFile (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="ZipFile (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/ZipFile.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/archivers/zip/ZipExtraField.html" title="interface in org.apache.commons.compress.archivers.zip"><span class="strong">Prev Class</span></a></li>
  43. <li><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipLong.html" title="class in org.apache.commons.compress.archivers.zip"><span class="strong">Next Class</span></a></li>
  44. </ul>
  45. <ul class="navList">
  46. <li><a href="../../../../../../index.html?org/apache/commons/compress/archivers/zip/ZipFile.html" target="_top">Frames</a></li>
  47. <li><a href="ZipFile.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><a href="#constructor_summary">Constr</a>&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><a href="#constructor_detail">Constr</a>&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.archivers.zip</div>
  86. <h2 title="Class ZipFile" class="title">Class ZipFile</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.archivers.zip.ZipFile</li>
  94. </ul>
  95. </li>
  96. </ul>
  97. <div class="description">
  98. <ul class="blockList">
  99. <li class="blockList">
  100. <dl>
  101. <dt>All Implemented Interfaces:</dt>
  102. <dd><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a></dd>
  103. </dl>
  104. <hr>
  105. <br>
  106. <pre>public class <a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipFile.html#line.83">ZipFile</a>
  107. 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>
  108. implements <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a></pre>
  109. <div class="block">Replacement for <code>java.util.ZipFile</code>.
  110. <p>This class adds support for file name encodings other than UTF-8
  111. (which is required to work on ZIP files created by native zip tools
  112. and is able to skip a preamble like the one found in self
  113. extracting archives. Furthermore it returns instances of
  114. <code>org.apache.commons.compress.archivers.zip.ZipArchiveEntry</code>
  115. instead of <code>java.util.zip.ZipEntry</code>.</p>
  116. <p>It doesn't extend <code>java.util.zip.ZipFile</code> as it would
  117. have to reimplement all methods anyway. Like
  118. <code>java.util.ZipFile</code>, it uses SeekableByteChannel under the
  119. covers and supports compressed and uncompressed entries. As of
  120. Apache Commons Compress 1.3 it also transparently supports Zip64
  121. extensions and thus individual entries and archives larger than 4
  122. GB or with more than 65536 entries.</p>
  123. <p>The method signatures mimic the ones of
  124. <code>java.util.zip.ZipFile</code>, with a couple of exceptions:
  125. <ul>
  126. <li>There is no getName method.</li>
  127. <li>entries has been renamed to getEntries.</li>
  128. <li>getEntries and getEntry return
  129. <code>org.apache.commons.compress.archivers.zip.ZipArchiveEntry</code>
  130. instances.</li>
  131. <li>close is allowed to throw IOException.</li>
  132. </ul></div>
  133. </li>
  134. </ul>
  135. </div>
  136. <div class="summary">
  137. <ul class="blockList">
  138. <li class="blockList">
  139. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  140. <ul class="blockList">
  141. <li class="blockList"><a name="constructor_summary">
  142. <!-- -->
  143. </a>
  144. <h3>Constructor Summary</h3>
  145. <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
  146. <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
  147. <tr>
  148. <th class="colOne" scope="col">Constructor and Description</th>
  149. </tr>
  150. <tr class="altColor">
  151. <td class="colOne"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipFile.html#ZipFile(java.io.File)">ZipFile</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;f)</code>
  152. <div class="block">Opens the given file for reading, assuming "UTF8" for file names.</div>
  153. </td>
  154. </tr>
  155. <tr class="rowColor">
  156. <td class="colOne"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipFile.html#ZipFile(java.io.File,%20java.lang.String)">ZipFile</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;f,
  157. <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;encoding)</code>
  158. <div class="block">Opens the given file for reading, assuming the specified
  159. encoding for file names and scanning for unicode extra fields.</div>
  160. </td>
  161. </tr>
  162. <tr class="altColor">
  163. <td class="colOne"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipFile.html#ZipFile(java.io.File,%20java.lang.String,%20boolean)">ZipFile</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;f,
  164. <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;encoding,
  165. boolean&nbsp;useUnicodeExtraFields)</code>
  166. <div class="block">Opens the given file for reading, assuming the specified
  167. encoding for file names.</div>
  168. </td>
  169. </tr>
  170. <tr class="rowColor">
  171. <td class="colOne"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipFile.html#ZipFile(java.nio.channels.SeekableByteChannel)">ZipFile</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/channels/SeekableByteChannel.html?is-external=true" title="class or interface in java.nio.channels">SeekableByteChannel</a>&nbsp;channel)</code>
  172. <div class="block">Opens the given channel for reading, assuming "UTF8" for file names.</div>
  173. </td>
  174. </tr>
  175. <tr class="altColor">
  176. <td class="colOne"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipFile.html#ZipFile(java.nio.channels.SeekableByteChannel,%20java.lang.String)">ZipFile</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/channels/SeekableByteChannel.html?is-external=true" title="class or interface in java.nio.channels">SeekableByteChannel</a>&nbsp;channel,
  177. <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;encoding)</code>
  178. <div class="block">Opens the given channel for reading, assuming the specified
  179. encoding for file names.</div>
  180. </td>
  181. </tr>
  182. <tr class="rowColor">
  183. <td class="colOne"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipFile.html#ZipFile(java.nio.channels.SeekableByteChannel,%20java.lang.String,%20java.lang.String,%20boolean)">ZipFile</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/channels/SeekableByteChannel.html?is-external=true" title="class or interface in java.nio.channels">SeekableByteChannel</a>&nbsp;channel,
  184. <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;archiveName,
  185. <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;encoding,
  186. boolean&nbsp;useUnicodeExtraFields)</code>
  187. <div class="block">Opens the given channel for reading, assuming the specified
  188. encoding for file names.</div>
  189. </td>
  190. </tr>
  191. <tr class="altColor">
  192. <td class="colOne"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipFile.html#ZipFile(java.lang.String)">ZipFile</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;name)</code>
  193. <div class="block">Opens the given file for reading, assuming "UTF8".</div>
  194. </td>
  195. </tr>
  196. <tr class="rowColor">
  197. <td class="colOne"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipFile.html#ZipFile(java.lang.String,%20java.lang.String)">ZipFile</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;name,
  198. <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;encoding)</code>
  199. <div class="block">Opens the given file for reading, assuming the specified
  200. encoding for file names, scanning unicode extra fields.</div>
  201. </td>
  202. </tr>
  203. </table>
  204. </li>
  205. </ul>
  206. <!-- ========== METHOD SUMMARY =========== -->
  207. <ul class="blockList">
  208. <li class="blockList"><a name="method_summary">
  209. <!-- -->
  210. </a>
  211. <h3>Method Summary</h3>
  212. <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
  213. <caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
  214. <tr>
  215. <th class="colFirst" scope="col">Modifier and Type</th>
  216. <th class="colLast" scope="col">Method and Description</th>
  217. </tr>
  218. <tr class="altColor">
  219. <td class="colFirst"><code>boolean</code></td>
  220. <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipFile.html#canReadEntryData(org.apache.commons.compress.archivers.zip.ZipArchiveEntry)">canReadEntryData</a></strong>(<a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveEntry.html" title="class in org.apache.commons.compress.archivers.zip">ZipArchiveEntry</a>&nbsp;ze)</code>
  221. <div class="block">Whether this class is able to read the given entry.</div>
  222. </td>
  223. </tr>
  224. <tr class="rowColor">
  225. <td class="colFirst"><code>void</code></td>
  226. <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipFile.html#close()">close</a></strong>()</code>
  227. <div class="block">Closes the archive.</div>
  228. </td>
  229. </tr>
  230. <tr class="altColor">
  231. <td class="colFirst"><code>static void</code></td>
  232. <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipFile.html#closeQuietly(org.apache.commons.compress.archivers.zip.ZipFile)">closeQuietly</a></strong>(<a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipFile.html" title="class in org.apache.commons.compress.archivers.zip">ZipFile</a>&nbsp;zipfile)</code>
  233. <div class="block">close a zipfile quietly; throw no io fault, do nothing
  234. on a null parameter</div>
  235. </td>
  236. </tr>
  237. <tr class="rowColor">
  238. <td class="colFirst"><code>void</code></td>
  239. <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipFile.html#copyRawEntries(org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream,%20org.apache.commons.compress.archivers.zip.ZipArchiveEntryPredicate)">copyRawEntries</a></strong>(<a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html" title="class in org.apache.commons.compress.archivers.zip">ZipArchiveOutputStream</a>&nbsp;target,
  240. <a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveEntryPredicate.html" title="interface in org.apache.commons.compress.archivers.zip">ZipArchiveEntryPredicate</a>&nbsp;predicate)</code>
  241. <div class="block">Transfer selected entries from this zipfile to a given #ZipArchiveOutputStream.</div>
  242. </td>
  243. </tr>
  244. <tr class="altColor">
  245. <td class="colFirst"><code>protected void</code></td>
  246. <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipFile.html#finalize()">finalize</a></strong>()</code>
  247. <div class="block">Ensures that the close method of this zipfile is called when
  248. there are no more references to it.</div>
  249. </td>
  250. </tr>
  251. <tr class="rowColor">
  252. <td class="colFirst"><code><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>
  253. <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipFile.html#getEncoding()">getEncoding</a></strong>()</code>
  254. <div class="block">The encoding to use for filenames and the file comment.</div>
  255. </td>
  256. </tr>
  257. <tr class="altColor">
  258. <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/Enumeration.html?is-external=true" title="class or interface in java.util">Enumeration</a>&lt;<a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveEntry.html" title="class in org.apache.commons.compress.archivers.zip">ZipArchiveEntry</a>&gt;</code></td>
  259. <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipFile.html#getEntries()">getEntries</a></strong>()</code>
  260. <div class="block">Returns all entries.</div>
  261. </td>
  262. </tr>
  263. <tr class="rowColor">
  264. <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a>&lt;<a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveEntry.html" title="class in org.apache.commons.compress.archivers.zip">ZipArchiveEntry</a>&gt;</code></td>
  265. <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipFile.html#getEntries(java.lang.String)">getEntries</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;name)</code>
  266. <div class="block">Returns all named entries in the same order they appear within
  267. the archive's central directory.</div>
  268. </td>
  269. </tr>
  270. <tr class="altColor">
  271. <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/Enumeration.html?is-external=true" title="class or interface in java.util">Enumeration</a>&lt;<a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveEntry.html" title="class in org.apache.commons.compress.archivers.zip">ZipArchiveEntry</a>&gt;</code></td>
  272. <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipFile.html#getEntriesInPhysicalOrder()">getEntriesInPhysicalOrder</a></strong>()</code>
  273. <div class="block">Returns all entries in physical order.</div>
  274. </td>
  275. </tr>
  276. <tr class="rowColor">
  277. <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a>&lt;<a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveEntry.html" title="class in org.apache.commons.compress.archivers.zip">ZipArchiveEntry</a>&gt;</code></td>
  278. <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipFile.html#getEntriesInPhysicalOrder(java.lang.String)">getEntriesInPhysicalOrder</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;name)</code>
  279. <div class="block">Returns all named entries in the same order their contents
  280. appear within the archive.</div>
  281. </td>
  282. </tr>
  283. <tr class="altColor">
  284. <td class="colFirst"><code><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveEntry.html" title="class in org.apache.commons.compress.archivers.zip">ZipArchiveEntry</a></code></td>
  285. <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipFile.html#getEntry(java.lang.String)">getEntry</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;name)</code>
  286. <div class="block">Returns a named entry - or <code>null</code> if no entry by
  287. that name exists.</div>
  288. </td>
  289. </tr>
  290. <tr class="rowColor">
  291. <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a></code></td>
  292. <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipFile.html#getInputStream(org.apache.commons.compress.archivers.zip.ZipArchiveEntry)">getInputStream</a></strong>(<a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveEntry.html" title="class in org.apache.commons.compress.archivers.zip">ZipArchiveEntry</a>&nbsp;ze)</code>
  293. <div class="block">Returns an InputStream for reading the contents of the given entry.</div>
  294. </td>
  295. </tr>
  296. <tr class="altColor">
  297. <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a></code></td>
  298. <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipFile.html#getRawInputStream(org.apache.commons.compress.archivers.zip.ZipArchiveEntry)">getRawInputStream</a></strong>(<a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveEntry.html" title="class in org.apache.commons.compress.archivers.zip">ZipArchiveEntry</a>&nbsp;ze)</code>
  299. <div class="block">Expose the raw stream of the archive entry (compressed form).</div>
  300. </td>
  301. </tr>
  302. <tr class="rowColor">
  303. <td class="colFirst"><code><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>
  304. <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipFile.html#getUnixSymlink(org.apache.commons.compress.archivers.zip.ZipArchiveEntry)">getUnixSymlink</a></strong>(<a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveEntry.html" title="class in org.apache.commons.compress.archivers.zip">ZipArchiveEntry</a>&nbsp;entry)</code>
  305. <div class="block">
  306. Convenience method to return the entry's content as a String if isUnixSymlink()
  307. returns true for it, otherwise returns null.</div>
  308. </td>
  309. </tr>
  310. </table>
  311. <ul class="blockList">
  312. <li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
  313. <!-- -->
  314. </a>
  315. <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>
  316. <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#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>
  317. </ul>
  318. </li>
  319. </ul>
  320. </li>
  321. </ul>
  322. </div>
  323. <div class="details">
  324. <ul class="blockList">
  325. <li class="blockList">
  326. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  327. <ul class="blockList">
  328. <li class="blockList"><a name="constructor_detail">
  329. <!-- -->
  330. </a>
  331. <h3>Constructor Detail</h3>
  332. <a name="ZipFile(java.io.File)">
  333. <!-- -->
  334. </a>
  335. <ul class="blockList">
  336. <li class="blockList">
  337. <h4>ZipFile</h4>
  338. <pre>public&nbsp;<a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipFile.html#line.160">ZipFile</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;f)
  339. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  340. <div class="block">Opens the given file for reading, assuming "UTF8" for file names.</div>
  341. <dl><dt><span class="strong">Parameters:</span></dt><dd><code>f</code> - the archive.</dd>
  342. <dt><span class="strong">Throws:</span></dt>
  343. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an error occurs while reading the file.</dd></dl>
  344. </li>
  345. </ul>
  346. <a name="ZipFile(java.lang.String)">
  347. <!-- -->
  348. </a>
  349. <ul class="blockList">
  350. <li class="blockList">
  351. <h4>ZipFile</h4>
  352. <pre>public&nbsp;<a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipFile.html#line.171">ZipFile</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;name)
  353. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  354. <div class="block">Opens the given file for reading, assuming "UTF8".</div>
  355. <dl><dt><span class="strong">Parameters:</span></dt><dd><code>name</code> - name of the archive.</dd>
  356. <dt><span class="strong">Throws:</span></dt>
  357. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an error occurs while reading the file.</dd></dl>
  358. </li>
  359. </ul>
  360. <a name="ZipFile(java.lang.String, java.lang.String)">
  361. <!-- -->
  362. </a>
  363. <ul class="blockList">
  364. <li class="blockList">
  365. <h4>ZipFile</h4>
  366. <pre>public&nbsp;<a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipFile.html#line.185">ZipFile</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;name,
  367. <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;encoding)
  368. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  369. <div class="block">Opens the given file for reading, assuming the specified
  370. encoding for file names, scanning unicode extra fields.</div>
  371. <dl><dt><span class="strong">Parameters:</span></dt><dd><code>name</code> - name of the archive.</dd><dd><code>encoding</code> - the encoding to use for file names, use null
  372. for the platform's default encoding</dd>
  373. <dt><span class="strong">Throws:</span></dt>
  374. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an error occurs while reading the file.</dd></dl>
  375. </li>
  376. </ul>
  377. <a name="ZipFile(java.io.File, java.lang.String)">
  378. <!-- -->
  379. </a>
  380. <ul class="blockList">
  381. <li class="blockList">
  382. <h4>ZipFile</h4>
  383. <pre>public&nbsp;<a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipFile.html#line.199">ZipFile</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;f,
  384. <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;encoding)
  385. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  386. <div class="block">Opens the given file for reading, assuming the specified
  387. encoding for file names and scanning for unicode extra fields.</div>
  388. <dl><dt><span class="strong">Parameters:</span></dt><dd><code>f</code> - the archive.</dd><dd><code>encoding</code> - the encoding to use for file names, use null
  389. for the platform's default encoding</dd>
  390. <dt><span class="strong">Throws:</span></dt>
  391. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an error occurs while reading the file.</dd></dl>
  392. </li>
  393. </ul>
  394. <a name="ZipFile(java.io.File, java.lang.String, boolean)">
  395. <!-- -->
  396. </a>
  397. <ul class="blockList">
  398. <li class="blockList">
  399. <h4>ZipFile</h4>
  400. <pre>public&nbsp;<a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipFile.html#line.215">ZipFile</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a>&nbsp;f,
  401. <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;encoding,
  402. boolean&nbsp;useUnicodeExtraFields)
  403. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  404. <div class="block">Opens the given file for reading, assuming the specified
  405. encoding for file names.</div>
  406. <dl><dt><span class="strong">Parameters:</span></dt><dd><code>f</code> - the archive.</dd><dd><code>encoding</code> - the encoding to use for file names, use null
  407. for the platform's default encoding</dd><dd><code>useUnicodeExtraFields</code> - whether to use InfoZIP Unicode
  408. Extra Fields (if present) to set the file names.</dd>
  409. <dt><span class="strong">Throws:</span></dt>
  410. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an error occurs while reading the file.</dd></dl>
  411. </li>
  412. </ul>
  413. <a name="ZipFile(java.nio.channels.SeekableByteChannel)">
  414. <!-- -->
  415. </a>
  416. <ul class="blockList">
  417. <li class="blockList">
  418. <h4>ZipFile</h4>
  419. <pre>public&nbsp;<a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipFile.html#line.233">ZipFile</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/channels/SeekableByteChannel.html?is-external=true" title="class or interface in java.nio.channels">SeekableByteChannel</a>&nbsp;channel)
  420. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  421. <div class="block">Opens the given channel for reading, assuming "UTF8" for file names.
  422. <p><a href="../../../../../../org/apache/commons/compress/utils/SeekableInMemoryByteChannel.html" title="class in org.apache.commons.compress.utils"><code>SeekableInMemoryByteChannel</code></a>
  423. allows you to read from an in-memory archive.</p></div>
  424. <dl><dt><span class="strong">Parameters:</span></dt><dd><code>channel</code> - the archive.</dd>
  425. <dt><span class="strong">Throws:</span></dt>
  426. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an error occurs while reading the file.</dd><dt><span class="strong">Since:</span></dt>
  427. <dd>1.13</dd></dl>
  428. </li>
  429. </ul>
  430. <a name="ZipFile(java.nio.channels.SeekableByteChannel, java.lang.String)">
  431. <!-- -->
  432. </a>
  433. <ul class="blockList">
  434. <li class="blockList">
  435. <h4>ZipFile</h4>
  436. <pre>public&nbsp;<a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipFile.html#line.253">ZipFile</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/channels/SeekableByteChannel.html?is-external=true" title="class or interface in java.nio.channels">SeekableByteChannel</a>&nbsp;channel,
  437. <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;encoding)
  438. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  439. <div class="block">Opens the given channel for reading, assuming the specified
  440. encoding for file names.
  441. <p><a href="../../../../../../org/apache/commons/compress/utils/SeekableInMemoryByteChannel.html" title="class in org.apache.commons.compress.utils"><code>SeekableInMemoryByteChannel</code></a>
  442. allows you to read from an in-memory archive.</p></div>
  443. <dl><dt><span class="strong">Parameters:</span></dt><dd><code>channel</code> - the archive.</dd><dd><code>encoding</code> - the encoding to use for file names, use null
  444. for the platform's default encoding</dd>
  445. <dt><span class="strong">Throws:</span></dt>
  446. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an error occurs while reading the file.</dd><dt><span class="strong">Since:</span></dt>
  447. <dd>1.13</dd></dl>
  448. </li>
  449. </ul>
  450. <a name="ZipFile(java.nio.channels.SeekableByteChannel, java.lang.String, java.lang.String, boolean)">
  451. <!-- -->
  452. </a>
  453. <ul class="blockListLast">
  454. <li class="blockList">
  455. <h4>ZipFile</h4>
  456. <pre>public&nbsp;<a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipFile.html#line.276">ZipFile</a>(<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/channels/SeekableByteChannel.html?is-external=true" title="class or interface in java.nio.channels">SeekableByteChannel</a>&nbsp;channel,
  457. <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;archiveName,
  458. <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;encoding,
  459. boolean&nbsp;useUnicodeExtraFields)
  460. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  461. <div class="block">Opens the given channel for reading, assuming the specified
  462. encoding for file names.
  463. <p><a href="../../../../../../org/apache/commons/compress/utils/SeekableInMemoryByteChannel.html" title="class in org.apache.commons.compress.utils"><code>SeekableInMemoryByteChannel</code></a>
  464. allows you to read from an in-memory archive.</p></div>
  465. <dl><dt><span class="strong">Parameters:</span></dt><dd><code>channel</code> - the archive.</dd><dd><code>archiveName</code> - name of the archive, used for error messages only.</dd><dd><code>encoding</code> - the encoding to use for file names, use null
  466. for the platform's default encoding</dd><dd><code>useUnicodeExtraFields</code> - whether to use InfoZIP Unicode
  467. Extra Fields (if present) to set the file names.</dd>
  468. <dt><span class="strong">Throws:</span></dt>
  469. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an error occurs while reading the file.</dd><dt><span class="strong">Since:</span></dt>
  470. <dd>1.13</dd></dl>
  471. </li>
  472. </ul>
  473. </li>
  474. </ul>
  475. <!-- ============ METHOD DETAIL ========== -->
  476. <ul class="blockList">
  477. <li class="blockList"><a name="method_detail">
  478. <!-- -->
  479. </a>
  480. <h3>Method Detail</h3>
  481. <a name="getEncoding()">
  482. <!-- -->
  483. </a>
  484. <ul class="blockList">
  485. <li class="blockList">
  486. <h4>getEncoding</h4>
  487. <pre>public&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/archivers/zip/ZipFile.html#line.310">getEncoding</a>()</pre>
  488. <div class="block">The encoding to use for filenames and the file comment.</div>
  489. <dl><dt><span class="strong">Returns:</span></dt><dd>null if using the platform's default character encoding.</dd></dl>
  490. </li>
  491. </ul>
  492. <a name="close()">
  493. <!-- -->
  494. </a>
  495. <ul class="blockList">
  496. <li class="blockList">
  497. <h4>close</h4>
  498. <pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipFile.html#line.319">close</a>()
  499. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  500. <div class="block">Closes the archive.</div>
  501. <dl>
  502. <dt><strong>Specified by:</strong></dt>
  503. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true#close()" title="class or interface in java.io">close</a></code>&nbsp;in interface&nbsp;<code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a></code></dd>
  504. <dt><strong>Specified by:</strong></dt>
  505. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/AutoCloseable.html?is-external=true#close()" title="class or interface in java.lang">close</a></code>&nbsp;in interface&nbsp;<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a></code></dd>
  506. <dt><span class="strong">Throws:</span></dt>
  507. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an error occurs closing the archive.</dd></dl>
  508. </li>
  509. </ul>
  510. <a name="closeQuietly(org.apache.commons.compress.archivers.zip.ZipFile)">
  511. <!-- -->
  512. </a>
  513. <ul class="blockList">
  514. <li class="blockList">
  515. <h4>closeQuietly</h4>
  516. <pre>public static&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipFile.html#line.333">closeQuietly</a>(<a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipFile.html" title="class in org.apache.commons.compress.archivers.zip">ZipFile</a>&nbsp;zipfile)</pre>
  517. <div class="block">close a zipfile quietly; throw no io fault, do nothing
  518. on a null parameter</div>
  519. <dl><dt><span class="strong">Parameters:</span></dt><dd><code>zipfile</code> - file to close, can be null</dd></dl>
  520. </li>
  521. </ul>
  522. <a name="getEntries()">
  523. <!-- -->
  524. </a>
  525. <ul class="blockList">
  526. <li class="blockList">
  527. <h4>getEntries</h4>
  528. <pre>public&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Enumeration.html?is-external=true" title="class or interface in java.util">Enumeration</a>&lt;<a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveEntry.html" title="class in org.apache.commons.compress.archivers.zip">ZipArchiveEntry</a>&gt;&nbsp;<a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipFile.html#line.345">getEntries</a>()</pre>
  529. <div class="block">Returns all entries.
  530. <p>Entries will be returned in the same order they appear
  531. within the archive's central directory.</p></div>
  532. <dl><dt><span class="strong">Returns:</span></dt><dd>all entries as <a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveEntry.html" title="class in org.apache.commons.compress.archivers.zip"><code>ZipArchiveEntry</code></a> instances</dd></dl>
  533. </li>
  534. </ul>
  535. <a name="getEntriesInPhysicalOrder()">
  536. <!-- -->
  537. </a>
  538. <ul class="blockList">
  539. <li class="blockList">
  540. <h4>getEntriesInPhysicalOrder</h4>
  541. <pre>public&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Enumeration.html?is-external=true" title="class or interface in java.util">Enumeration</a>&lt;<a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveEntry.html" title="class in org.apache.commons.compress.archivers.zip">ZipArchiveEntry</a>&gt;&nbsp;<a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipFile.html#line.359">getEntriesInPhysicalOrder</a>()</pre>
  542. <div class="block">Returns all entries in physical order.
  543. <p>Entries will be returned in the same order their contents
  544. appear within the archive.</p></div>
  545. <dl><dt><span class="strong">Returns:</span></dt><dd>all entries as <a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveEntry.html" title="class in org.apache.commons.compress.archivers.zip"><code>ZipArchiveEntry</code></a> instances</dd><dt><span class="strong">Since:</span></dt>
  546. <dd>1.1</dd></dl>
  547. </li>
  548. </ul>
  549. <a name="getEntry(java.lang.String)">
  550. <!-- -->
  551. </a>
  552. <ul class="blockList">
  553. <li class="blockList">
  554. <h4>getEntry</h4>
  555. <pre>public&nbsp;<a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveEntry.html" title="class in org.apache.commons.compress.archivers.zip">ZipArchiveEntry</a>&nbsp;<a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipFile.html#line.377">getEntry</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;name)</pre>
  556. <div class="block">Returns a named entry - or <code>null</code> if no entry by
  557. that name exists.
  558. <p>If multiple entries with the same name exist the first entry
  559. in the archive's central directory by that name is
  560. returned.</p></div>
  561. <dl><dt><span class="strong">Parameters:</span></dt><dd><code>name</code> - name of the entry.</dd>
  562. <dt><span class="strong">Returns:</span></dt><dd>the ZipArchiveEntry corresponding to the given name - or
  563. <code>null</code> if not present.</dd></dl>
  564. </li>
  565. </ul>
  566. <a name="getEntries(java.lang.String)">
  567. <!-- -->
  568. </a>
  569. <ul class="blockList">
  570. <li class="blockList">
  571. <h4>getEntries</h4>
  572. <pre>public&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a>&lt;<a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveEntry.html" title="class in org.apache.commons.compress.archivers.zip">ZipArchiveEntry</a>&gt;&nbsp;<a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipFile.html#line.391">getEntries</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;name)</pre>
  573. <div class="block">Returns all named entries in the same order they appear within
  574. the archive's central directory.</div>
  575. <dl><dt><span class="strong">Parameters:</span></dt><dd><code>name</code> - name of the entry.</dd>
  576. <dt><span class="strong">Returns:</span></dt><dd>the Iterable&lt;ZipArchiveEntry&gt; corresponding to the
  577. given name</dd><dt><span class="strong">Since:</span></dt>
  578. <dd>1.6</dd></dl>
  579. </li>
  580. </ul>
  581. <a name="getEntriesInPhysicalOrder(java.lang.String)">
  582. <!-- -->
  583. </a>
  584. <ul class="blockList">
  585. <li class="blockList">
  586. <h4>getEntriesInPhysicalOrder</h4>
  587. <pre>public&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a>&lt;<a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveEntry.html" title="class in org.apache.commons.compress.archivers.zip">ZipArchiveEntry</a>&gt;&nbsp;<a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipFile.html#line.406">getEntriesInPhysicalOrder</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;name)</pre>
  588. <div class="block">Returns all named entries in the same order their contents
  589. appear within the archive.</div>
  590. <dl><dt><span class="strong">Parameters:</span></dt><dd><code>name</code> - name of the entry.</dd>
  591. <dt><span class="strong">Returns:</span></dt><dd>the Iterable&lt;ZipArchiveEntry&gt; corresponding to the
  592. given name</dd><dt><span class="strong">Since:</span></dt>
  593. <dd>1.6</dd></dl>
  594. </li>
  595. </ul>
  596. <a name="canReadEntryData(org.apache.commons.compress.archivers.zip.ZipArchiveEntry)">
  597. <!-- -->
  598. </a>
  599. <ul class="blockList">
  600. <li class="blockList">
  601. <h4>canReadEntryData</h4>
  602. <pre>public&nbsp;boolean&nbsp;<a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipFile.html#line.424">canReadEntryData</a>(<a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveEntry.html" title="class in org.apache.commons.compress.archivers.zip">ZipArchiveEntry</a>&nbsp;ze)</pre>
  603. <div class="block">Whether this class is able to read the given entry.
  604. <p>May return false if it is set up to use encryption or a
  605. compression method that hasn't been implemented yet.</p></div>
  606. <dl><dt><span class="strong">Parameters:</span></dt><dd><code>ze</code> - the entry</dd>
  607. <dt><span class="strong">Returns:</span></dt><dd>whether this class is able to read the given entry.</dd><dt><span class="strong">Since:</span></dt>
  608. <dd>1.1</dd></dl>
  609. </li>
  610. </ul>
  611. <a name="getRawInputStream(org.apache.commons.compress.archivers.zip.ZipArchiveEntry)">
  612. <!-- -->
  613. </a>
  614. <ul class="blockList">
  615. <li class="blockList">
  616. <h4>getRawInputStream</h4>
  617. <pre>public&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;<a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipFile.html#line.438">getRawInputStream</a>(<a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveEntry.html" title="class in org.apache.commons.compress.archivers.zip">ZipArchiveEntry</a>&nbsp;ze)</pre>
  618. <div class="block">Expose the raw stream of the archive entry (compressed form).
  619. <p>This method does not relate to how/if we understand the payload in the
  620. stream, since we really only intend to move it on to somewhere else.</p></div>
  621. <dl><dt><span class="strong">Parameters:</span></dt><dd><code>ze</code> - The entry to get the stream for</dd>
  622. <dt><span class="strong">Returns:</span></dt><dd>The raw input stream containing (possibly) compressed data.</dd><dt><span class="strong">Since:</span></dt>
  623. <dd>1.11</dd></dl>
  624. </li>
  625. </ul>
  626. <a name="copyRawEntries(org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream, org.apache.commons.compress.archivers.zip.ZipArchiveEntryPredicate)">
  627. <!-- -->
  628. </a>
  629. <ul class="blockList">
  630. <li class="blockList">
  631. <h4>copyRawEntries</h4>
  632. <pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipFile.html#line.457">copyRawEntries</a>(<a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.html" title="class in org.apache.commons.compress.archivers.zip">ZipArchiveOutputStream</a>&nbsp;target,
  633. <a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveEntryPredicate.html" title="interface in org.apache.commons.compress.archivers.zip">ZipArchiveEntryPredicate</a>&nbsp;predicate)
  634. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  635. <div class="block">Transfer selected entries from this zipfile to a given #ZipArchiveOutputStream.
  636. Compression and all other attributes will be as in this file.
  637. <p>This method transfers entries based on the central directory of the zip file.</p></div>
  638. <dl><dt><span class="strong">Parameters:</span></dt><dd><code>target</code> - The zipArchiveOutputStream to write the entries to</dd><dd><code>predicate</code> - A predicate that selects which entries to write</dd>
  639. <dt><span class="strong">Throws:</span></dt>
  640. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - on error</dd></dl>
  641. </li>
  642. </ul>
  643. <a name="getInputStream(org.apache.commons.compress.archivers.zip.ZipArchiveEntry)">
  644. <!-- -->
  645. </a>
  646. <ul class="blockList">
  647. <li class="blockList">
  648. <h4>getInputStream</h4>
  649. <pre>public&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;<a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipFile.html#line.476">getInputStream</a>(<a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveEntry.html" title="class in org.apache.commons.compress.archivers.zip">ZipArchiveEntry</a>&nbsp;ze)
  650. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a>,
  651. <a href="http://docs.oracle.com/javase/7/docs/api/java/util/zip/ZipException.html?is-external=true" title="class or interface in java.util.zip">ZipException</a></pre>
  652. <div class="block">Returns an InputStream for reading the contents of the given entry.</div>
  653. <dl><dt><span class="strong">Parameters:</span></dt><dd><code>ze</code> - the entry to get the stream for.</dd>
  654. <dt><span class="strong">Returns:</span></dt><dd>a stream to read the entry from.</dd>
  655. <dt><span class="strong">Throws:</span></dt>
  656. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if unable to create an input stream from the zipentry</dd>
  657. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/zip/ZipException.html?is-external=true" title="class or interface in java.util.zip">ZipException</a></code> - if the zipentry uses an unsupported feature</dd></dl>
  658. </li>
  659. </ul>
  660. <a name="getUnixSymlink(org.apache.commons.compress.archivers.zip.ZipArchiveEntry)">
  661. <!-- -->
  662. </a>
  663. <ul class="blockList">
  664. <li class="blockList">
  665. <h4>getUnixSymlink</h4>
  666. <pre>public&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/archivers/zip/ZipFile.html#line.544">getUnixSymlink</a>(<a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipArchiveEntry.html" title="class in org.apache.commons.compress.archivers.zip">ZipArchiveEntry</a>&nbsp;entry)
  667. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
  668. <div class="block"><p>
  669. Convenience method to return the entry's content as a String if isUnixSymlink()
  670. returns true for it, otherwise returns null.
  671. </p>
  672. <p>This method assumes the symbolic link's file name uses the
  673. same encoding that as been specified for this ZipFile.</p></div>
  674. <dl><dt><span class="strong">Parameters:</span></dt><dd><code>entry</code> - ZipArchiveEntry object that represents the symbolic link</dd>
  675. <dt><span class="strong">Returns:</span></dt><dd>entry's content as a String</dd>
  676. <dt><span class="strong">Throws:</span></dt>
  677. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - problem with content's input stream</dd><dt><span class="strong">Since:</span></dt>
  678. <dd>1.5</dd></dl>
  679. </li>
  680. </ul>
  681. <a name="finalize()">
  682. <!-- -->
  683. </a>
  684. <ul class="blockListLast">
  685. <li class="blockList">
  686. <h4>finalize</h4>
  687. <pre>protected&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/commons/compress/archivers/zip/ZipFile.html#line.559">finalize</a>()
  688. throws <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</a></pre>
  689. <div class="block">Ensures that the close method of this zipfile is called when
  690. there are no more references to it.</div>
  691. <dl>
  692. <dt><strong>Overrides:</strong></dt>
  693. <dd><code><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></code>&nbsp;in class&nbsp;<code><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></code></dd>
  694. <dt><span class="strong">Throws:</span></dt>
  695. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html?is-external=true" title="class or interface in java.lang">Throwable</a></code></dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipFile.html#close()"><code>close()</code></a></dd></dl>
  696. </li>
  697. </ul>
  698. </li>
  699. </ul>
  700. </li>
  701. </ul>
  702. </div>
  703. </div>
  704. <!-- ========= END OF CLASS DATA ========= -->
  705. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  706. <div class="bottomNav"><a name="navbar_bottom">
  707. <!-- -->
  708. </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
  709. <!-- -->
  710. </a>
  711. <ul class="navList" title="Navigation">
  712. <li><a href="../../../../../../overview-summary.html">Overview</a></li>
  713. <li><a href="package-summary.html">Package</a></li>
  714. <li class="navBarCell1Rev">Class</li>
  715. <li><a href="class-use/ZipFile.html">Use</a></li>
  716. <li><a href="package-tree.html">Tree</a></li>
  717. <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
  718. <li><a href="../../../../../../index-all.html">Index</a></li>
  719. <li><a href="../../../../../../help-doc.html">Help</a></li>
  720. </ul>
  721. </div>
  722. <div class="subNav">
  723. <ul class="navList">
  724. <li><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipExtraField.html" title="interface in org.apache.commons.compress.archivers.zip"><span class="strong">Prev Class</span></a></li>
  725. <li><a href="../../../../../../org/apache/commons/compress/archivers/zip/ZipLong.html" title="class in org.apache.commons.compress.archivers.zip"><span class="strong">Next Class</span></a></li>
  726. </ul>
  727. <ul class="navList">
  728. <li><a href="../../../../../../index.html?org/apache/commons/compress/archivers/zip/ZipFile.html" target="_top">Frames</a></li>
  729. <li><a href="ZipFile.html" target="_top">No Frames</a></li>
  730. </ul>
  731. <ul class="navList" id="allclasses_navbar_bottom">
  732. <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
  733. </ul>
  734. <div>
  735. <script type="text/javascript"><!--
  736. allClassesLink = document.getElementById("allclasses_navbar_bottom");
  737. if(window==top) {
  738. allClassesLink.style.display = "block";
  739. }
  740. else {
  741. allClassesLink.style.display = "none";
  742. }
  743. //-->
  744. </script>
  745. </div>
  746. <div>
  747. <ul class="subNavList">
  748. <li>Summary:&nbsp;</li>
  749. <li>Nested&nbsp;|&nbsp;</li>
  750. <li>Field&nbsp;|&nbsp;</li>
  751. <li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
  752. <li><a href="#method_summary">Method</a></li>
  753. </ul>
  754. <ul class="subNavList">
  755. <li>Detail:&nbsp;</li>
  756. <li>Field&nbsp;|&nbsp;</li>
  757. <li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
  758. <li><a href="#method_detail">Method</a></li>
  759. </ul>
  760. </div>
  761. <a name="skip-navbar_bottom">
  762. <!-- -->
  763. </a></div>
  764. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  765. <p class="legalCopy"><small>Copyright &#169; 2016 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
  766. </body>
  767. </html>