Package skyview.survey

# Class Cacher

java.lang.Object
skyview.survey.Cacher

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

## Constructor Summary

Constructors
Constructor
Description
`Cacher()`

## Method Summary

Modifier and Type
Method
Description
`String`
`cacheRemoteURL(String url, String cacheFile)`
Read a URL into the cache and return the full path to the cached file.
`String`
`getCachedFileName(String file)`
See if there is a file in the cache that is of the approprite name.
`String`
`getFile(String url, String file)`
`String`
`getSurveySubdir()`
If we are divvying the cache by surveys, find the appropriate name for the current survey subdirectory.
`String`
`getWriteCache()`
Find the name of the write cache directory and if necessary create it

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### Cacher

public Cacher()

## Method Details

### 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`

### getFile

public String getFile(String url, String file) throws Exception

Throws:
  `Exception`