InputStream getInputStream(ZipEntry entry) throws IOException { if (!lockOpen()) { throw new IOException("Failed to open zip file."); //$NON-NLS-1$ } try { InputStream zipStream = zipFile.getInputStream(entry); if (isMruEnabled()) { zipStream = new ZipBundleEntryInputStream(zipStream); } return zipStream; } finally { openLock.unlock(); } }
InputStream getInputStream(ZipEntry entry) throws IOException { if (!lockOpen()) { throw new IOException("Failed to open zip file."); //$NON-NLS-1$ } try { InputStream zipStream = zipFile.getInputStream(entry); if (isMruEnabled()) { zipStream = new ZipBundleEntryInputStream(zipStream); } return zipStream; } finally { openLock.unlock(); } }
/** * Return an InputStream for the entry. * * @return InputStream for the entry * @exception java.io.IOException */ public InputStream getInputStream() throws IOException { ZipBundleFile zipBundleFile = bundleFile; if (!zipBundleFile.isMruEnabled()) return bundleFile.getZipFile().getInputStream(zipEntry); zipBundleFile.incrementReference(); InputStream result = null; try { return result = new ZipBundleEntryInputStream(zipBundleFile.getZipFile().getInputStream(zipEntry)); } finally { if (result == null) // an exception occurred; decrement the reference zipBundleFile.decrementReference(); } }
/** * Return an InputStream for the entry. * * @return InputStream for the entry * @exception java.io.IOException */ public InputStream getInputStream() throws IOException { ZipBundleFile zipBundleFile = bundleFile; if (!zipBundleFile.isMruEnabled()) return bundleFile.getZipFile().getInputStream(zipEntry); zipBundleFile.incrementReference(); InputStream result = null; try { return result = new ZipBundleEntryInputStream(zipBundleFile.getZipFile().getInputStream(zipEntry)); } finally { if (result == null) // an exception occurred; decrement the reference zipBundleFile.decrementReference(); } }
/** * Return an InputStream for the entry. * * @return InputStream for the entry * @exception java.io.IOException */ public InputStream getInputStream() throws IOException { ZipBundleFile zipBundleFile = bundleFile; if (!zipBundleFile.isMruEnabled()) return bundleFile.getZipFile().getInputStream(zipEntry); zipBundleFile.incrementReference(); InputStream result = null; try { return result = new ZipBundleEntryInputStream(zipBundleFile.getZipFile().getInputStream(zipEntry)); } finally { if (result == null) // an exception occurred; decrement the reference zipBundleFile.decrementReference(); } }
/** * Return an InputStream for the entry. * * @return InputStream for the entry * @exception java.io.IOException */ public InputStream getInputStream() throws IOException { ZipBundleFile zipBundleFile = bundleFile; if (!zipBundleFile.isMruEnabled()) return bundleFile.getZipFile().getInputStream(zipEntry); zipBundleFile.incrementReference(); InputStream result = null; try { return result = new ZipBundleEntryInputStream(zipBundleFile.getZipFile().getInputStream(zipEntry)); } finally { if (result == null) // an exception occurred; decrement the reference zipBundleFile.decrementReference(); } }