Package org.eclipse.mat.hprof
Class GZIPInputStream2
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.eclipse.mat.hprof.GZIPInputStream2
- All Implemented Interfaces:
Closeable
,AutoCloseable
A stream for reading Gzip compressed files.
Uses a modified
InflaterInputStream
to allow the
state of the stream to be duplicated, aiding code for random access to Gzip files.-
Constructor Summary
ConstructorDescriptionNormal constructorCopy constructor used for duplicating a stream. -
Method Summary
Methods inherited from class java.io.FilterInputStream
available, read
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
GZIPInputStream2
Copy constructor used for duplicating a stream. To use either stream thereafter the underlying stream must be in the correct position.- Parameters:
gs
- the stream to be duplicated- Throws:
IOException
-
GZIPInputStream2
Normal constructor- Parameters:
is
- the compressed data- Throws:
IOException
-
-
Method Details
-
read
- Overrides:
read
in classFilterInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classFilterInputStream
- Throws:
IOException
-
skip
Need to implementFilterInputStream.skip(long)
to the check CRC. We can call the underlyingskip(long)
if we are rereading data.- Overrides:
skip
in classFilterInputStream
- Parameters:
n
- bytes to skip- Returns:
- bytes actually skipped
- Throws:
IOException
-
comment
-
filename
-
mark
public void mark(int limit) - Overrides:
mark
in classFilterInputStream
-
reset
- Overrides:
reset
in classFilterInputStream
- Throws:
IOException
-
markSupported
public boolean markSupported()- Overrides:
markSupported
in classFilterInputStream
-
toString
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classFilterInputStream
- Throws:
IOException
-