@Override public void removeNotify() { closeCurrentRoot(true); }
/** Close the jar file when we go away...*/ @Override protected void finalize() throws Throwable { super.finalize(); closeCurrentRoot(false); }
private void freeReference() { aliveCount--; // Nobody uses this JarFileSystem => stop watcher, close JarFile and throw away cache. if (aliveCount == 0) { Task w = watcherTask; if (w != null) { w.cancel(); watcherTask = null; } strongCache = null; // no more active FO, keep only soft ref closeCurrentRoot(false); } }
/** Get the JAR manifest. * It will be lazily initialized. * @return parsed manifest file for this archive */ public Manifest getManifest() { if (manifest == null) { try { synchronized (closeSync) { JarFile j = reOpenJarFile(); manifest = (j == null) ? null : j.getManifest(); manifest = (manifest == null) ? null : new Manifest(manifest); } } catch (IOException ex) { } finally { closeCurrentRoot(false); } if (manifest == null) { manifest = new Manifest(); } } return manifest; }
protected long size(String name) { long retVal = getEntry(name).getSize(); closeCurrentRoot(false); return (retVal == -1) ? 0 : retVal; }
protected Date lastModified(String name) { long t; if (name.length() == 0) { t = getJarFile().lastModified(); } else { try { t = getEntry(name).getTime(); } finally { closeCurrentRoot(false); } } return new Date(t); }
throw fnfe; } finally { closeCurrentRoot(false);
_setSystemName(s); closeCurrentRoot(false); setJar(tempJar); openRequestTime = System.currentTimeMillis();
public void removeNotify () { closeCurrentRoot (true); }
public void removeNotify () { closeCurrentRoot (true); }
/** Close the jar file when we go away...*/ protected void finalize () throws Throwable { super.finalize(); closeCurrentRoot (false); }
/** Close the jar file when we go away...*/ protected void finalize () throws Throwable { super.finalize(); closeCurrentRoot (false); }
private void freeReference() { aliveCount--; // Nobody uses this JarFileSystem => stop watcher, close JarFile and throw away cache. if (aliveCount == 0) { if (watcherTask != null) { watcherTask.cancel(); watcherTask = null; } strongCache = null; // no more active FO, keep only soft ref closeCurrentRoot(false); } }
private void freeReference() { aliveCount--; // Nobody uses this JarFileSystem => stop watcher, close JarFile and throw away cache. if (aliveCount == 0) { if (watcherTask != null) { watcherTask.cancel(); watcherTask = null; } strongCache = null; // no more active FO, keep only soft ref closeCurrentRoot(false); } }
/** Get the JAR manifest. * It will be lazily initialized. * @return parsed manifest file for this archive */ public Manifest getManifest() { if (manifest == null) { try { synchronized (closeSync) { JarFile j = reOpenJarFile (); manifest = j == null ? null : j.getManifest (); manifest = manifest == null ? null : new Manifest(manifest); } } catch (IOException ex) { } finally { closeCurrentRoot(false); } if (manifest == null) manifest = new Manifest (); } return manifest; }
protected java.util.Date lastModified(String name) { /** JarEntry.getTime returns wrong value: already reported in bugtraq 4319781 * Fixed in jdk1.4 */ try { return new java.util.Date (getEntry (name).getTime ()); } finally { closeCurrentRoot(false); } }
protected java.util.Date lastModified(String name) { /** JarEntry.getTime returns wrong value: already reported in bugtraq 4319781 * Fixed in jdk1.4 */ try { return new java.util.Date (getEntry (name).getTime ()); } finally { closeCurrentRoot(false); } }
protected long size (String name) { long retVal = getEntry (name).getSize (); closeCurrentRoot(false); return (retVal == -1) ? 0 : retVal; }
protected long size (String name) { long retVal = getEntry (name).getSize (); closeCurrentRoot(false); return (retVal == -1) ? 0 : retVal; }