Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
1.26.2
-
None
Description
There are two incorrect statements in the Javadoc for GzipCompressorInputStream:
If you use the constructor GzipCompressorInputStream(in) or GzipCompressorInputStream(in, false) with some InputStream in then read() will return -1 as soon as the first internal member has been read completely. The stream in will be positioned at the start of the second gzip member if there is one.
That statement is only true if the configured input stream supports mark()/reset().
Otherwise not, an IOException may be thrown if/when reset() is invoked on the input stream (or maybe not if you get lucky and the stars and read buffering align).
GZIPInputStream doesn't decompress concatenated .gz files: it stops after the first member and silently ignores the rest.
That statement was true a long time ago but is no longer true. This support was added in JDK 7 (see JDK-4691425).
Attachments
Issue Links
- links to