GzipCompressorInputStream.html 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446
  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>GzipCompressorInputStream (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="GzipCompressorInputStream (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/GzipCompressorInputStream.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>Prev Class</li>
  43. <li><a href="../../../../../../org/apache/commons/compress/compressors/gzip/GzipCompressorOutputStream.html" title="class in org.apache.commons.compress.compressors.gzip"><span class="strong">Next Class</span></a></li>
  44. </ul>
  45. <ul class="navList">
  46. <li><a href="../../../../../../index.html?org/apache/commons/compress/compressors/gzip/GzipCompressorInputStream.html" target="_top">Frames</a></li>
  47. <li><a href="GzipCompressorInputStream.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.compressors.gzip</div>
  86. <h2 title="Class GzipCompressorInputStream" class="title">Class GzipCompressorInputStream</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><a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">java.io.InputStream</a></li>
  94. <li>
  95. <ul class="inheritance">
  96. <li><a href="../../../../../../org/apache/commons/compress/compressors/CompressorInputStream.html" title="class in org.apache.commons.compress.compressors">org.apache.commons.compress.compressors.CompressorInputStream</a></li>
  97. <li>
  98. <ul class="inheritance">
  99. <li>org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream</li>
  100. </ul>
  101. </li>
  102. </ul>
  103. </li>
  104. </ul>
  105. </li>
  106. </ul>
  107. <div class="description">
  108. <ul class="blockList">
  109. <li class="blockList">
  110. <dl>
  111. <dt>All Implemented Interfaces:</dt>
  112. <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>
  113. </dl>
  114. <hr>
  115. <br>
  116. <pre>public class <a href="../../../../../../src-html/org/apache/commons/compress/compressors/gzip/GzipCompressorInputStream.html#line.50">GzipCompressorInputStream</a>
  117. extends <a href="../../../../../../org/apache/commons/compress/compressors/CompressorInputStream.html" title="class in org.apache.commons.compress.compressors">CompressorInputStream</a></pre>
  118. <div class="block">Input stream that decompresses .gz files.
  119. This supports decompressing concatenated .gz files which is important
  120. when decompressing standalone .gz files.
  121. <p>
  122. <a href="http://docs.oracle.com/javase/7/docs/api/java/util/zip/GZIPInputStream.html?is-external=true" title="class or interface in java.util.zip"><code>GZIPInputStream</code></a> doesn't decompress concatenated .gz
  123. files: it stops after the first member and silently ignores the rest.
  124. It doesn't leave the read position to point to the beginning of the next
  125. member, which makes it difficult workaround the lack of concatenation
  126. support.
  127. <p>
  128. Instead of using <code>GZIPInputStream</code>, this class has its own .gz
  129. container format decoder. The actual decompression is done with
  130. <a href="http://docs.oracle.com/javase/7/docs/api/java/util/zip/Inflater.html?is-external=true" title="class or interface in java.util.zip"><code>Inflater</code></a>.</div>
  131. </li>
  132. </ul>
  133. </div>
  134. <div class="summary">
  135. <ul class="blockList">
  136. <li class="blockList">
  137. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  138. <ul class="blockList">
  139. <li class="blockList"><a name="constructor_summary">
  140. <!-- -->
  141. </a>
  142. <h3>Constructor Summary</h3>
  143. <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
  144. <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
  145. <tr>
  146. <th class="colOne" scope="col">Constructor and Description</th>
  147. </tr>
  148. <tr class="altColor">
  149. <td class="colOne"><code><strong><a href="../../../../../../org/apache/commons/compress/compressors/gzip/GzipCompressorInputStream.html#GzipCompressorInputStream(java.io.InputStream)">GzipCompressorInputStream</a></strong>(<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;inputStream)</code>
  150. <div class="block">Constructs a new input stream that decompresses gzip-compressed data
  151. from the specified input stream.</div>
  152. </td>
  153. </tr>
  154. <tr class="rowColor">
  155. <td class="colOne"><code><strong><a href="../../../../../../org/apache/commons/compress/compressors/gzip/GzipCompressorInputStream.html#GzipCompressorInputStream(java.io.InputStream,%20boolean)">GzipCompressorInputStream</a></strong>(<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;inputStream,
  156. boolean&nbsp;decompressConcatenated)</code>
  157. <div class="block">Constructs a new input stream that decompresses gzip-compressed data
  158. from the specified input stream.</div>
  159. </td>
  160. </tr>
  161. </table>
  162. </li>
  163. </ul>
  164. <!-- ========== METHOD SUMMARY =========== -->
  165. <ul class="blockList">
  166. <li class="blockList"><a name="method_summary">
  167. <!-- -->
  168. </a>
  169. <h3>Method Summary</h3>
  170. <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
  171. <caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
  172. <tr>
  173. <th class="colFirst" scope="col">Modifier and Type</th>
  174. <th class="colLast" scope="col">Method and Description</th>
  175. </tr>
  176. <tr class="altColor">
  177. <td class="colFirst"><code>void</code></td>
  178. <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/compressors/gzip/GzipCompressorInputStream.html#close()">close</a></strong>()</code>
  179. <div class="block">Closes the input stream (unless it is System.in).</div>
  180. </td>
  181. </tr>
  182. <tr class="rowColor">
  183. <td class="colFirst"><code><a href="../../../../../../org/apache/commons/compress/compressors/gzip/GzipParameters.html" title="class in org.apache.commons.compress.compressors.gzip">GzipParameters</a></code></td>
  184. <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/compressors/gzip/GzipCompressorInputStream.html#getMetaData()">getMetaData</a></strong>()</code>
  185. <div class="block">Provides the stream's meta data - may change with each stream
  186. when decompressing concatenated streams.</div>
  187. </td>
  188. </tr>
  189. <tr class="altColor">
  190. <td class="colFirst"><code>static boolean</code></td>
  191. <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/compressors/gzip/GzipCompressorInputStream.html#matches(byte[],%20int)">matches</a></strong>(byte[]&nbsp;signature,
  192. int&nbsp;length)</code>
  193. <div class="block">Checks if the signature matches what is expected for a .gz file.</div>
  194. </td>
  195. </tr>
  196. <tr class="rowColor">
  197. <td class="colFirst"><code>int</code></td>
  198. <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/compressors/gzip/GzipCompressorInputStream.html#read()">read</a></strong>()</code>&nbsp;</td>
  199. </tr>
  200. <tr class="altColor">
  201. <td class="colFirst"><code>int</code></td>
  202. <td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/compress/compressors/gzip/GzipCompressorInputStream.html#read(byte[],%20int,%20int)">read</a></strong>(byte[]&nbsp;b,
  203. int&nbsp;off,
  204. int&nbsp;len)</code></td>
  205. </tr>
  206. </table>
  207. <ul class="blockList">
  208. <li class="blockList"><a name="methods_inherited_from_class_org.apache.commons.compress.compressors.CompressorInputStream">
  209. <!-- -->
  210. </a>
  211. <h3>Methods inherited from class&nbsp;org.apache.commons.compress.compressors.<a href="../../../../../../org/apache/commons/compress/compressors/CompressorInputStream.html" title="class in org.apache.commons.compress.compressors">CompressorInputStream</a></h3>
  212. <code><a href="../../../../../../org/apache/commons/compress/compressors/CompressorInputStream.html#count(int)">count</a>, <a href="../../../../../../org/apache/commons/compress/compressors/CompressorInputStream.html#count(long)">count</a>, <a href="../../../../../../org/apache/commons/compress/compressors/CompressorInputStream.html#getBytesRead()">getBytesRead</a>, <a href="../../../../../../org/apache/commons/compress/compressors/CompressorInputStream.html#getCount()">getCount</a>, <a href="../../../../../../org/apache/commons/compress/compressors/CompressorInputStream.html#pushedBackBytes(long)">pushedBackBytes</a></code></li>
  213. </ul>
  214. <ul class="blockList">
  215. <li class="blockList"><a name="methods_inherited_from_class_java.io.InputStream">
  216. <!-- -->
  217. </a>
  218. <h3>Methods inherited from class&nbsp;java.io.<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></h3>
  219. <code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true#available()" title="class or interface in java.io">available</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true#mark(int)" title="class or interface in java.io">mark</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true#markSupported()" title="class or interface in java.io">markSupported</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true#read(byte[])" title="class or interface in java.io">read</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true#reset()" title="class or interface in java.io">reset</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true#skip(long)" title="class or interface in java.io">skip</a></code></li>
  220. </ul>
  221. <ul class="blockList">
  222. <li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
  223. <!-- -->
  224. </a>
  225. <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>
  226. <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>
  227. </ul>
  228. </li>
  229. </ul>
  230. </li>
  231. </ul>
  232. </div>
  233. <div class="details">
  234. <ul class="blockList">
  235. <li class="blockList">
  236. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  237. <ul class="blockList">
  238. <li class="blockList"><a name="constructor_detail">
  239. <!-- -->
  240. </a>
  241. <h3>Constructor Detail</h3>
  242. <a name="GzipCompressorInputStream(java.io.InputStream)">
  243. <!-- -->
  244. </a>
  245. <ul class="blockList">
  246. <li class="blockList">
  247. <h4>GzipCompressorInputStream</h4>
  248. <pre>public&nbsp;<a href="../../../../../../src-html/org/apache/commons/compress/compressors/gzip/GzipCompressorInputStream.html#line.98">GzipCompressorInputStream</a>(<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;inputStream)
  249. 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>
  250. <div class="block">Constructs a new input stream that decompresses gzip-compressed data
  251. from the specified input stream.
  252. <p>
  253. This is equivalent to
  254. <code>GzipCompressorInputStream(inputStream, false)</code> and thus
  255. will not decompress concatenated .gz files.</div>
  256. <dl><dt><span class="strong">Parameters:</span></dt><dd><code>inputStream</code> - the InputStream from which this object should
  257. be created of</dd>
  258. <dt><span class="strong">Throws:</span></dt>
  259. <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 the stream could not be created</dd></dl>
  260. </li>
  261. </ul>
  262. <a name="GzipCompressorInputStream(java.io.InputStream, boolean)">
  263. <!-- -->
  264. </a>
  265. <ul class="blockListLast">
  266. <li class="blockList">
  267. <h4>GzipCompressorInputStream</h4>
  268. <pre>public&nbsp;<a href="../../../../../../src-html/org/apache/commons/compress/compressors/gzip/GzipCompressorInputStream.html#line.123">GzipCompressorInputStream</a>(<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;inputStream,
  269. boolean&nbsp;decompressConcatenated)
  270. 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>
  271. <div class="block">Constructs a new input stream that decompresses gzip-compressed data
  272. from the specified input stream.
  273. <p>
  274. If <code>decompressConcatenated</code> is <code>false</code>:
  275. This decompressor might read more input than it will actually use.
  276. If <code>inputStream</code> supports <code>mark</code> and
  277. <code>reset</code>, then the input position will be adjusted
  278. so that it is right after the last byte of the compressed stream.
  279. If <code>mark</code> isn't supported, the input position will be
  280. undefined.</div>
  281. <dl><dt><span class="strong">Parameters:</span></dt><dd><code>inputStream</code> - the InputStream from which this object should
  282. be created of</dd><dd><code>decompressConcatenated</code> - if true, decompress until the end of the input;
  283. if false, stop after the first .gz member</dd>
  284. <dt><span class="strong">Throws:</span></dt>
  285. <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 the stream could not be created</dd></dl>
  286. </li>
  287. </ul>
  288. </li>
  289. </ul>
  290. <!-- ============ METHOD DETAIL ========== -->
  291. <ul class="blockList">
  292. <li class="blockList"><a name="method_detail">
  293. <!-- -->
  294. </a>
  295. <h3>Method Detail</h3>
  296. <a name="getMetaData()">
  297. <!-- -->
  298. </a>
  299. <ul class="blockList">
  300. <li class="blockList">
  301. <h4>getMetaData</h4>
  302. <pre>public&nbsp;<a href="../../../../../../org/apache/commons/compress/compressors/gzip/GzipParameters.html" title="class in org.apache.commons.compress.compressors.gzip">GzipParameters</a>&nbsp;<a href="../../../../../../src-html/org/apache/commons/compress/compressors/gzip/GzipCompressorInputStream.html#line.144">getMetaData</a>()</pre>
  303. <div class="block">Provides the stream's meta data - may change with each stream
  304. when decompressing concatenated streams.</div>
  305. <dl><dt><span class="strong">Returns:</span></dt><dd>the stream's meta data</dd><dt><span class="strong">Since:</span></dt>
  306. <dd>1.8</dd></dl>
  307. </li>
  308. </ul>
  309. <a name="read()">
  310. <!-- -->
  311. </a>
  312. <ul class="blockList">
  313. <li class="blockList">
  314. <h4>read</h4>
  315. <pre>public&nbsp;int&nbsp;<a href="../../../../../../src-html/org/apache/commons/compress/compressors/gzip/GzipCompressorInputStream.html#line.253">read</a>()
  316. 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>
  317. <dl>
  318. <dt><strong>Specified by:</strong></dt>
  319. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true#read()" title="class or interface in java.io">read</a></code>&nbsp;in class&nbsp;<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></dd>
  320. <dt><span class="strong">Throws:</span></dt>
  321. <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></dd></dl>
  322. </li>
  323. </ul>
  324. <a name="read(byte[], int, int)">
  325. <!-- -->
  326. </a>
  327. <ul class="blockList">
  328. <li class="blockList">
  329. <h4>read</h4>
  330. <pre>public&nbsp;int&nbsp;<a href="../../../../../../src-html/org/apache/commons/compress/compressors/gzip/GzipCompressorInputStream.html#line.263">read</a>(byte[]&nbsp;b,
  331. int&nbsp;off,
  332. int&nbsp;len)
  333. 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>
  334. <dl>
  335. <dt><strong>Overrides:</strong></dt>
  336. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true#read(byte[],%20int,%20int)" title="class or interface in java.io">read</a></code>&nbsp;in class&nbsp;<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></dd>
  337. <dt><span class="strong">Throws:</span></dt>
  338. <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></dd><dt><span class="strong">Since:</span></dt>
  339. <dd>1.1</dd></dl>
  340. </li>
  341. </ul>
  342. <a name="matches(byte[], int)">
  343. <!-- -->
  344. </a>
  345. <ul class="blockList">
  346. <li class="blockList">
  347. <h4>matches</h4>
  348. <pre>public static&nbsp;boolean&nbsp;<a href="../../../../../../src-html/org/apache/commons/compress/compressors/gzip/GzipCompressorInputStream.html#line.352">matches</a>(byte[]&nbsp;signature,
  349. int&nbsp;length)</pre>
  350. <div class="block">Checks if the signature matches what is expected for a .gz file.</div>
  351. <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>
  352. <dt><span class="strong">Returns:</span></dt><dd>true if this is a .gz stream, false otherwise</dd><dt><span class="strong">Since:</span></dt>
  353. <dd>1.1</dd></dl>
  354. </li>
  355. </ul>
  356. <a name="close()">
  357. <!-- -->
  358. </a>
  359. <ul class="blockListLast">
  360. <li class="blockList">
  361. <h4>close</h4>
  362. <pre>public&nbsp;void&nbsp;<a href="../../../../../../src-html/org/apache/commons/compress/compressors/gzip/GzipCompressorInputStream.html#line.375">close</a>()
  363. 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>
  364. <div class="block">Closes the input stream (unless it is System.in).</div>
  365. <dl>
  366. <dt><strong>Specified by:</strong></dt>
  367. <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>
  368. <dt><strong>Specified by:</strong></dt>
  369. <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>
  370. <dt><strong>Overrides:</strong></dt>
  371. <dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true#close()" title="class or interface in java.io">close</a></code>&nbsp;in class&nbsp;<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></dd>
  372. <dt><span class="strong">Throws:</span></dt>
  373. <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></dd><dt><span class="strong">Since:</span></dt>
  374. <dd>1.2</dd></dl>
  375. </li>
  376. </ul>
  377. </li>
  378. </ul>
  379. </li>
  380. </ul>
  381. </div>
  382. </div>
  383. <!-- ========= END OF CLASS DATA ========= -->
  384. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  385. <div class="bottomNav"><a name="navbar_bottom">
  386. <!-- -->
  387. </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
  388. <!-- -->
  389. </a>
  390. <ul class="navList" title="Navigation">
  391. <li><a href="../../../../../../overview-summary.html">Overview</a></li>
  392. <li><a href="package-summary.html">Package</a></li>
  393. <li class="navBarCell1Rev">Class</li>
  394. <li><a href="class-use/GzipCompressorInputStream.html">Use</a></li>
  395. <li><a href="package-tree.html">Tree</a></li>
  396. <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
  397. <li><a href="../../../../../../index-all.html">Index</a></li>
  398. <li><a href="../../../../../../help-doc.html">Help</a></li>
  399. </ul>
  400. </div>
  401. <div class="subNav">
  402. <ul class="navList">
  403. <li>Prev Class</li>
  404. <li><a href="../../../../../../org/apache/commons/compress/compressors/gzip/GzipCompressorOutputStream.html" title="class in org.apache.commons.compress.compressors.gzip"><span class="strong">Next Class</span></a></li>
  405. </ul>
  406. <ul class="navList">
  407. <li><a href="../../../../../../index.html?org/apache/commons/compress/compressors/gzip/GzipCompressorInputStream.html" target="_top">Frames</a></li>
  408. <li><a href="GzipCompressorInputStream.html" target="_top">No Frames</a></li>
  409. </ul>
  410. <ul class="navList" id="allclasses_navbar_bottom">
  411. <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
  412. </ul>
  413. <div>
  414. <script type="text/javascript"><!--
  415. allClassesLink = document.getElementById("allclasses_navbar_bottom");
  416. if(window==top) {
  417. allClassesLink.style.display = "block";
  418. }
  419. else {
  420. allClassesLink.style.display = "none";
  421. }
  422. //-->
  423. </script>
  424. </div>
  425. <div>
  426. <ul class="subNavList">
  427. <li>Summary:&nbsp;</li>
  428. <li>Nested&nbsp;|&nbsp;</li>
  429. <li>Field&nbsp;|&nbsp;</li>
  430. <li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
  431. <li><a href="#method_summary">Method</a></li>
  432. </ul>
  433. <ul class="subNavList">
  434. <li>Detail:&nbsp;</li>
  435. <li>Field&nbsp;|&nbsp;</li>
  436. <li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
  437. <li><a href="#method_detail">Method</a></li>
  438. </ul>
  439. </div>
  440. <a name="skip-navbar_bottom">
  441. <!-- -->
  442. </a></div>
  443. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  444. <p class="legalCopy"><small>Copyright &#169; 2016 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
  445. </body>
  446. </html>