-
- /**
- * See whether the SRTM file is already available locally
- * @param inUrl URL for online resource
- * @return file object to write to, or null if already there
- */
- private static File getFileToWrite(URL inUrl)
- {
- String diskCachePath = Config.getConfigString(Config.KEY_DISK_CACHE);
- if (diskCachePath != null)
- {
- File srtmDir = new File(diskCachePath, "srtm");
- if (srtmDir.exists() && srtmDir.isDirectory() && srtmDir.canRead())
- {
- File srtmFile = new File(srtmDir, new File(inUrl.getFile()).getName());
- if (!srtmFile.exists() || !srtmFile.canRead() || srtmFile.length() <= 400) {
- return srtmFile;
- }
- }
- }
- return null;
- }
-
- /**
- * @return true if a thread is currently running
- */
- public boolean isRunning()
- {
- return _running;
- }