Package net.lingala.zip4j.io.inputstream
Class ZipEntryInputStream
- java.lang.Object
-
- java.io.InputStream
-
- net.lingala.zip4j.io.inputstream.ZipEntryInputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
class ZipEntryInputStream extends java.io.InputStream
-
-
Field Summary
Fields Modifier and Type Field Description private long
compressedSize
private java.io.InputStream
inputStream
private static int
MAX_RAW_READ_FULLY_RETRY_ATTEMPTS
private long
numberOfBytesRead
private byte[]
singleByteArray
-
Constructor Summary
Constructors Constructor Description ZipEntryInputStream(java.io.InputStream inputStream, long compressedSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
long
getNumberOfBytesRead()
int
read()
int
read(byte[] b)
int
read(byte[] b, int off, int len)
int
readRawFully(byte[] b)
private int
readUntilBufferIsFull(byte[] b, int readLength)
-
-
-
Field Detail
-
MAX_RAW_READ_FULLY_RETRY_ATTEMPTS
private static final int MAX_RAW_READ_FULLY_RETRY_ATTEMPTS
- See Also:
- Constant Field Values
-
inputStream
private java.io.InputStream inputStream
-
numberOfBytesRead
private long numberOfBytesRead
-
singleByteArray
private byte[] singleByteArray
-
compressedSize
private long compressedSize
-
-
Method Detail
-
read
public int read() throws java.io.IOException
- Specified by:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
read
public int read(byte[] b) throws java.io.IOException
- Overrides:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException
- Overrides:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
readRawFully
public int readRawFully(byte[] b) throws java.io.IOException
- Throws:
java.io.IOException
-
readUntilBufferIsFull
private int readUntilBufferIsFull(byte[] b, int readLength) throws java.io.IOException
- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classjava.io.InputStream
- Throws:
java.io.IOException
-
getNumberOfBytesRead
public long getNumberOfBytesRead()
-
-