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:
Closeable
,AutoCloseable
- Enclosing class:
WeakZipFileFactory.WeakZipFile
This 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
FieldsModifier and TypeFieldDescriptionprivate int
private final String
private InputStream
private ZipFile
-
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
m_entryName
-
m_is
-
m_currentPos
private int m_currentPos -
m_zipFileSnapshot
-
-
Constructor Details
-
WeakZipInputStream
WeakZipInputStream(String entryName, InputStream is)
-
-
Method Details
-
ensureInputStreamIsValid
This 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:
IOException
- if the was an error handling the input stream.
-
available
- Overrides:
available
in classInputStream
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
-
mark
public void mark(int i) - Overrides:
mark
in classInputStream
-
markSupported
public boolean markSupported()- Overrides:
markSupported
in classInputStream
-
read
- Specified by:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
reset
- Overrides:
reset
in classInputStream
- Throws:
IOException
-
skip
- Overrides:
skip
in classInputStream
- Throws:
IOException
-