@SuppressWarnings("deprecation") public URL getFileURL() { try { File file = bundleFile.getFile(zipEntry.getName(), false); if (file != null) return file.toURL(); } catch (MalformedURLException e) { //This can not happen. } return null; } }
@SuppressWarnings("deprecation") public URL getFileURL() { try { File file = bundleFile.getFile(zipEntry.getName(), false); if (file != null) return file.toURL(); } catch (MalformedURLException e) { //This can not happen. } return null; } }
@SuppressWarnings("deprecation") public URL getFileURL() { try { File file = bundleFile.getFile(zipEntry.getName(), false); if (file != null) return file.toURL(); } catch (MalformedURLException e) { //This can not happen. } return null; }
@SuppressWarnings("deprecation") public URL getFileURL() { try { File file = bundleFile.getFile(zipEntry.getName(), false); if (file != null) return file.toURL(); } catch (MalformedURLException e) { //This can not happen. } return null; }
@SuppressWarnings("deprecation") public URL getFileURL() { try { File file = bundleFile.getFile(zipEntry.getName(), false); if (file != null) return file.toURL(); } catch (MalformedURLException e) { //This can not happen. } return null; }
@SuppressWarnings("deprecation") public URL getFileURL() { try { File file = bundleFile.getFile(zipEntry.getName(), false); if (file != null) return file.toURL(); } catch (MalformedURLException e) { //This can not happen. } return null; }
/** * Extracts a directory and all sub content to disk * @param dirName the directory name to extract * @return the File used to extract the content to. A value * of <code>null</code> is returned if the directory to extract does * not exist or if content extraction is not supported. */ protected synchronized File extractDirectory(String dirName) { if (!checkedOpen()) return null; Enumeration<? extends ZipEntry> entries = zipFile.entries(); while (entries.hasMoreElements()) { String entryPath = entries.nextElement().getName(); if (entryPath.startsWith(dirName) && !entryPath.endsWith("/")) //$NON-NLS-1$ getFile(entryPath, false); } return getExtractFile(dirName); }
/** * Extracts a directory and all sub content to disk * @param dirName the directory name to extract * @return the File used to extract the content to. A value * of <code>null</code> is returned if the directory to extract does * not exist or if content extraction is not supported. */ protected synchronized File extractDirectory(String dirName) { if (!checkedOpen()) return null; Enumeration<? extends ZipEntry> entries = zipFile.entries(); while (entries.hasMoreElements()) { String entryPath = entries.nextElement().getName(); if (entryPath.startsWith(dirName) && !entryPath.endsWith("/")) //$NON-NLS-1$ getFile(entryPath, false); } return getExtractFile(dirName); }
/** * Extracts a directory and all sub content to disk * @param dirName the directory name to extract * @return the File used to extract the content to. A value * of <code>null</code> is returned if the directory to extract does * not exist or if content extraction is not supported. */ protected synchronized File extractDirectory(String dirName) { if (!checkedOpen()) return null; Enumeration<? extends ZipEntry> entries = zipFile.entries(); while (entries.hasMoreElements()) { String entryPath = entries.nextElement().getName(); if (entryPath.startsWith(dirName) && !entryPath.endsWith("/")) //$NON-NLS-1$ getFile(entryPath, false); } return getExtractFile(dirName); }
/** * Extracts a directory and all sub content to disk * @param dirName the directory name to extract * @return the File used to extract the content to. A value * of <code>null</code> is returned if the directory to extract does * not exist or if content extraction is not supported. */ protected synchronized File extractDirectory(String dirName) { if (!checkedOpen()) return null; Enumeration<? extends ZipEntry> entries = zipFile.entries(); while (entries.hasMoreElements()) { String entryPath = entries.nextElement().getName(); if (entryPath.startsWith(dirName) && !entryPath.endsWith("/")) //$NON-NLS-1$ getFile(entryPath, false); } return getExtractFile(dirName); }
/** * Extracts a directory and all sub content to disk * @param dirName the directory name to extract * @return the File used to extract the content to. A value * of <code>null</code> is returned if the directory to extract does * not exist or if content extraction is not supported. */ File extractDirectory(String dirName) { if (!lockOpen()) { return null; } try { Enumeration<? extends ZipEntry> entries = zipFile.entries(); while (entries.hasMoreElements()) { String entryPath = entries.nextElement().getName(); if (entryPath.startsWith(dirName) && !entryPath.endsWith("/")) //$NON-NLS-1$ getFile(entryPath, false); } return getExtractFile(dirName); } finally { openLock.unlock(); } }
/** * Extracts a directory and all sub content to disk * @param dirName the directory name to extract * @return the File used to extract the content to. A value * of <code>null</code> is returned if the directory to extract does * not exist or if content extraction is not supported. */ File extractDirectory(String dirName) { if (!lockOpen()) { return null; } try { Enumeration<? extends ZipEntry> entries = zipFile.entries(); while (entries.hasMoreElements()) { String entryPath = entries.nextElement().getName(); if (entryPath.startsWith(dirName) && !entryPath.endsWith("/")) //$NON-NLS-1$ getFile(entryPath, false); } return getExtractFile(dirName); } finally { openLock.unlock(); } }