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 longcompressedSizeprivate java.io.InputStreaminputStreamprivate static intMAX_RAW_READ_FULLY_RETRY_ATTEMPTSprivate longnumberOfBytesReadprivate 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 voidclose()longgetNumberOfBytesRead()intread()intread(byte[] b)intread(byte[] b, int off, int len)intreadRawFully(byte[] b)private intreadUntilBufferIsFull(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:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
read
public int read(byte[] b) throws java.io.IOException- Overrides:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException- Overrides:
readin 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:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.InputStream- Throws:
java.io.IOException
-
getNumberOfBytesRead
public long getNumberOfBytesRead()
-
-