Package skyview.survey
Class Cacher
- java.lang.Object
-
- skyview.survey.Cacher
-
public class Cacher extends java.lang.Object
This class handles interactions with the file cache.
-
-
Constructor Summary
Constructors Constructor Description Cacher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
cacheRemoteURL(java.lang.String url, java.lang.String cacheFile)
Read a URL into the cache and return the full path to the cached file.java.lang.String
getCachedFileName(java.lang.String file)
See if there is a file in the cache that is of the approprite name.java.lang.String
getFile(java.lang.String url, java.lang.String file)
java.lang.String
getSurveySubdir()
If we are divvying the cache by surveys, find the appropriate name for the current survey subdirectory.java.lang.String
getWriteCache()
Find the name of the write cache directory and if necessary create it
-
-
-
Method Detail
-
getSurveySubdir
public java.lang.String getSurveySubdir()
If we are divvying the cache by surveys, find the appropriate name for the current survey subdirectory.- Returns:
- The escaped name of the survey.
-
getCachedFileName
public java.lang.String getCachedFileName(java.lang.String file)
See if there is a file in the cache that is of the approprite name.- Parameters:
file
-- Returns:
- The full path to the file.
-
getWriteCache
public java.lang.String getWriteCache()
Find the name of the write cache directory and if necessary create it
-
cacheRemoteURL
public java.lang.String cacheRemoteURL(java.lang.String url, java.lang.String cacheFile) throws java.lang.Exception
Read a URL into the cache and return the full path to the cached file.- Throws:
java.lang.Exception
-
getFile
public java.lang.String getFile(java.lang.String url, java.lang.String file) throws java.lang.Exception
- Throws:
java.lang.Exception
-
-