Package net.lingala.zip4j.io
Class InflaterInputStream
- java.lang.Object
-
- java.io.InputStream
-
- net.lingala.zip4j.io.BaseInputStream
-
- net.lingala.zip4j.io.PartInputStream
-
- net.lingala.zip4j.io.InflaterInputStream
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class InflaterInputStream extends PartInputStream
-
-
Constructor Summary
Constructors Constructor Description InflaterInputStream(RandomAccessFile raf, long start, long len, UnzipEngine unzipEngine)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
available()
Returns 0 after EOF has been reached, otherwise always return 1.void
close()
UnzipEngine
getUnzipEngine()
int
read()
int
read(byte[] b)
int
read(byte[] b, int off, int len)
void
seek(long pos)
long
skip(long n)
Skips specified number of bytes of uncompressed data.-
Methods inherited from class net.lingala.zip4j.io.PartInputStream
checkAndReadAESMacBytes
-
Methods inherited from class java.io.InputStream
mark, markSupported, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, transferTo
-
-
-
-
Constructor Detail
-
InflaterInputStream
public InflaterInputStream(RandomAccessFile raf, long start, long len, UnzipEngine unzipEngine)
-
-
Method Detail
-
read
public int read() throws IOException
- Overrides:
read
in classPartInputStream
- Throws:
IOException
-
read
public int read(byte[] b) throws IOException
- Overrides:
read
in classPartInputStream
- Throws:
IOException
-
read
public int read(byte[] b, int off, int len) throws IOException
- Overrides:
read
in classPartInputStream
- Throws:
IOException
-
skip
public long skip(long n) throws IOException
Skips specified number of bytes of uncompressed data.- Overrides:
skip
in classPartInputStream
- Parameters:
n
- the number of bytes to skip- Returns:
- the actual number of bytes skipped.
- Throws:
IOException
- if an I/O error has occurredIllegalArgumentException
- if n is less than 0
-
seek
public void seek(long pos) throws IOException
- Overrides:
seek
in classPartInputStream
- Throws:
IOException
-
available
public int available()
Returns 0 after EOF has been reached, otherwise always return 1.Programs should not count on this method to return the actual number of bytes that could be read without blocking.
- Overrides:
available
in classPartInputStream
- Returns:
- 1 before EOF and 0 after EOF.
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classPartInputStream
- Throws:
IOException
-
getUnzipEngine
public UnzipEngine getUnzipEngine()
- Overrides:
getUnzipEngine
in classPartInputStream
-
-