- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- java.util.zip.InflaterInputStream
-
- java.util.zip.GZIPInputStream
-
- com.aoapps.lang.zip.CorrectedGZIPInputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class CorrectedGZIPInputStream extends GZIPInputStream
Works around the "Corrupt GZIP trailer" problem inGZIPInputStreamby catching and ignoring this exception.- Author:
- AO Industries, Inc.
-
-
Field Summary
-
Fields inherited from class java.util.zip.GZIPInputStream
crc, eos, GZIP_MAGIC
-
Fields inherited from class java.util.zip.InflaterInputStream
buf, inf, len
-
Fields inherited from class java.io.FilterInputStream
in
-
-
Constructor Summary
Constructors Constructor Description CorrectedGZIPInputStream(InputStream in)CorrectedGZIPInputStream(InputStream in, int size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intread(byte[] buf, int off, int len)-
Methods inherited from class java.util.zip.GZIPInputStream
close
-
Methods inherited from class java.util.zip.InflaterInputStream
available, fill, mark, markSupported, read, reset, skip
-
Methods inherited from class java.io.FilterInputStream
read
-
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
-
-
-
Constructor Detail
-
CorrectedGZIPInputStream
public CorrectedGZIPInputStream(InputStream in) throws IOException
- Throws:
IOException
-
CorrectedGZIPInputStream
public CorrectedGZIPInputStream(InputStream in, int size) throws IOException
- Throws:
IOException
-
-
Method Detail
-
read
public int read(byte[] buf, int off, int len) throws IOException- Overrides:
readin classGZIPInputStream- Throws:
IOException
-
-