public void close() throws IOException { if (fileCache != null) { fileCache.release(this); return; } if (debugLeaks) openFiles.remove(location); if (session != null) { session.close(); session = null; } }
public void close() throws IOException { if (fileCache != null) { fileCache.release(this); return; } if (!readonly) flush(); source = null; }
@Override public synchronized void close() throws java.io.IOException { if (fileCache != null) { fileCache.release(this); } else { try { if (ncfile != null) ncfile.close(); } finally { ncfile = null; } } }
@Override public synchronized void close() throws java.io.IOException { if (fileCache != null) { fileCache.release(this); } else { try { if (ds != null) ds.close(); } finally { ds = null; } } }
@Override public synchronized void close() throws java.io.IOException { if (fileCache != null) { fileCache.release(this); } else { try { if (ncfile != null) ncfile.close(); } finally { ncfile = null; } } }
/** * Close all resources (files, sockets, etc) associated with this file. * If the underlying file was acquired, it will be released, otherwise closed. * if isClosed() already, nothing will happen * * @throws java.io.IOException if error when closing */ public synchronized void close() throws java.io.IOException { if (cache != null) { //unlocked = true; cache.release(this); } else { try { if (null != spi) { // log.warn("NetcdfFile.close called for ncfile="+this.hashCode()+" for iosp="+spi.hashCode()); spi.close(); } } finally { spi = null; } } }
fileCache.release(this); return;
/** * Close all resources (files, sockets, etc) associated with this dataset. * If the underlying file was acquired, it will be released, otherwise closed. */ @Override public synchronized void close() throws java.io.IOException { if (agg != null) agg.persistWrite(); // LOOK maybe only on real close ?? if (cache != null) { //unlocked = true; cache.release(this); } else { if (agg != null) agg.close(); agg = null; if (orgFile != null) orgFile.close(); orgFile = null; } }