Class Cacher


  • public class Cacher
    extends Object
    This class handles interactions with the file cache.
    • Constructor Detail

      • Cacher

        public Cacher()
    • Method Detail

      • getSurveySubdir

        public 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 String getCachedFileName​(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 String getWriteCache()
        Find the name of the write cache directory and if necessary create it
      • cacheRemoteURL

        public String cacheRemoteURL​(String url,
                                     String cacheFile)
                              throws Exception
        Read a URL into the cache and return the full path to the cached file.
        Throws:
        Exception