Package org.apache.felix.framework.util
Class WeakZipFileFactory.WeakZipFile.WeakZipInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.apache.felix.framework.util.WeakZipFileFactory.WeakZipFile.WeakZipInputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
- Enclosing class:
- WeakZipFileFactory.WeakZipFile
class WeakZipFileFactory.WeakZipFile.WeakZipInputStream extends java.io.InputStreamThis is an InputStream wrapper that will properly reopen the underlying zip file if it is weakly closed and create the underlying input stream.
-
-
Field Summary
Fields Modifier and Type Field Description private intm_currentPosprivate java.lang.Stringm_entryNameprivate java.io.InputStreamm_isprivate java.util.zip.ZipFilem_zipFileSnapshot
-
Constructor Summary
Constructors Constructor Description WeakZipInputStream(java.lang.String entryName, java.io.InputStream is)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()voidclose()private voidensureInputStreamIsValid()This internal method ensures that the zip file is open and that the underlying input stream is valid.voidmark(int i)booleanmarkSupported()intread()intread(byte[] bytes)intread(byte[] bytes, int i, int i1)voidreset()longskip(long l)
-
-
-
Method Detail
-
ensureInputStreamIsValid
private void ensureInputStreamIsValid() throws java.io.IOExceptionThis internal method ensures that the zip file is open and that the underlying input stream is valid. Upon successful completion, the underlying input stream will be valid and the local mutex will be held.- Throws:
java.io.IOException- if the was an error handling the input stream.
-
available
public int available() throws java.io.IOException- Overrides:
availablein classjava.io.InputStream- 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
-
mark
public void mark(int i)
- Overrides:
markin classjava.io.InputStream
-
markSupported
public boolean markSupported()
- Overrides:
markSupportedin classjava.io.InputStream
-
read
public int read() throws java.io.IOException- Specified by:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
read
public int read(byte[] bytes) throws java.io.IOException- Overrides:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
read
public int read(byte[] bytes, int i, int i1) throws java.io.IOException- Overrides:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
reset
public void reset() throws java.io.IOException- Overrides:
resetin classjava.io.InputStream- Throws:
java.io.IOException
-
skip
public long skip(long l) throws java.io.IOException- Overrides:
skipin classjava.io.InputStream- Throws:
java.io.IOException
-
-