public static boolean isImageBundled(URL fURL) { if ("file".equals(fURL.getProtocol())) { return bundleEquals(new File(fURL.getPath()).getParent()); } return false; }
/** * empty path list and add given path as first entry * Image cache is cleared completely * * @param path absolute path * @return true on success, false otherwise */ public static boolean reset(String path) { if (bundleEquals(path)) { return true; } reset(); return setBundlePath(path); }
/** * remove entry with given URL<br> * bundlepath (entry 0) cannot be removed * loaded images are removed from cache * * @param pURL a valid URL (not checked) * @return true on success, false ozherwise */ private static boolean remove(URL pURL) { if (bundleEquals(pURL)) { Image.purge(pURL); bundlePath = null; Settings.BundlePath = null; imagePaths.set(0, null); } Iterator<PathEntry> it = imagePaths.subList(1, imagePaths.size()).iterator(); PathEntry p, p0; p0 = imagePaths.get(0); while (it.hasNext()) { p = it.next(); if (!p.equals(pURL)) { continue; } it.remove(); Image.purge(p.pathURL); } return true; }
if (bundleEquals(path)) { return true;