public void open() throws IOException { getZipFile(); }
public void open() throws IOException { getZipFile(false); }
public void open() throws IOException { getZipFile(); }
public void open() throws IOException { getZipFile(false); }
public void open() throws IOException { getZipFile(); }
public void open() throws IOException { getZipFile(); }
/** * 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(); } }
/** * Checks if the zip file is open * @return true if the zip file is open */ protected boolean checkedOpen() { try { return getZipFile() != null; } catch (IOException e) { if (generation != null) { ModuleRevision r = generation.getRevision(); if (r != null) { generation.getBundleInfo().getStorage().getAdaptor().publishContainerEvent(ContainerEvent.ERROR, r.getRevisions().getModule(), e); } } // TODO not sure if throwing a runtime exception is better // throw new RuntimeException("Failed to open bundle file.", e); return false; } }
/** * Checks if the zip file is open * @return true if the zip file is open */ protected boolean checkedOpen() { try { return getZipFile() != null; } catch (IOException e) { if (generation != null) { ModuleRevision r = generation.getRevision(); if (r != null) { generation.getBundleInfo().getStorage().getAdaptor().publishContainerEvent(ContainerEvent.ERROR, r.getRevisions().getModule(), e); } } // TODO not sure if throwing a runtime exception is better // throw new RuntimeException("Failed to open bundle file.", e); return false; } }
/** * Checks if the zip file is open * @return true if the zip file is open */ private boolean lockOpen() { try { return getZipFile(true) != null; } catch (IOException e) { if (generation != null) { ModuleRevision r = generation.getRevision(); if (r != null) { ContainerEvent eventType = ContainerEvent.ERROR; // If the revision has been removed from the list of revisions then it has been deleted // because the bundle has been uninstalled or updated if (!r.getRevisions().getModuleRevisions().contains(r)) { // instead of filling the log with errors about missing files from // uninstalled/updated bundles just give it an info level eventType = ContainerEvent.INFO; } generation.getBundleInfo().getStorage().getAdaptor().publishContainerEvent(eventType, r.getRevisions().getModule(), e); } } // TODO not sure if throwing a runtime exception is better // throw new RuntimeException("Failed to open bundle file.", e); return false; } }
/** * Checks if the zip file is open * @return true if the zip file is open */ protected boolean checkedOpen() { try { return getZipFile() != null; } catch (IOException e) { if (generation != null) { ModuleRevision r = generation.getRevision(); if (r != null) { generation.getBundleInfo().getStorage().getAdaptor().publishContainerEvent(ContainerEvent.ERROR, r.getRevisions().getModule(), e); } } // TODO not sure if throwing a runtime exception is better // throw new RuntimeException("Failed to open bundle file.", e); return false; } }
/** * Checks if the zip file is open * @return true if the zip file is open */ protected boolean checkedOpen() { try { return getZipFile() != null; } catch (IOException e) { if (generation != null) { ModuleRevision r = generation.getRevision(); if (r != null) { generation.getBundleInfo().getStorage().getAdaptor().publishContainerEvent(ContainerEvent.ERROR, r.getRevisions().getModule(), e); } } // TODO not sure if throwing a runtime exception is better // throw new RuntimeException("Failed to open bundle file.", e); return false; } }
/** * Checks if the zip file is open * @return true if the zip file is open */ private boolean lockOpen() { try { return getZipFile(true) != null; } catch (IOException e) { if (generation != null) { ModuleRevision r = generation.getRevision(); if (r != null) { ContainerEvent eventType = ContainerEvent.ERROR; // If the revision has been removed from the list of revisions then it has been deleted // because the bundle has been uninstalled or updated if (!r.getRevisions().getModuleRevisions().contains(r)) { // instead of filling the log with errors about missing files from // uninstalled/updated bundles just give it an info level eventType = ContainerEvent.INFO; } generation.getBundleInfo().getStorage().getAdaptor().publishContainerEvent(eventType, r.getRevisions().getModule(), e); } } // TODO not sure if throwing a runtime exception is better // throw new RuntimeException("Failed to open bundle file.", e); return false; } }