Overview | Package | Class | Use | Tree | Index | Help
| NASA World Wind
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## gov.nasa.worldwind
Class AbstractFileCache

    java.lang.Object
      gov.nasa.worldwind.AbstractFileCache

All Implemented Interfaces:
  FileCache

Direct Known Subclasses:
  BasicDataFileCache

    public class AbstractFileCache

extends Object
implements FileCache

Field Summary

Fields inherited from interface gov.nasa.worldwind.FileCache
`OS_SPECIFIC_DATA_PATH`

Constructor Summary
`AbstractFileCache()`

Method Summary
`void` | `addCacheLocation(int index, String newPath)`
`void` | `addCacheLocation(String newPath)`
`boolean` | `contains(String fileName)`
`URL` | `findFile(String fileName, boolean checkClassPath)`
`List<File>` | `getCacheLocations()`
`File` | `getWriteLocation()`
`protected void` | `initialize(InputStream xmlConfigStream)`
`File` | `newFile(String fileName)`
`void` | `removeCacheLocation(String newPath)`
`void` | `removeFile(URL url)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AbstractFileCache

    public AbstractFileCache()

Method Detail

### addCacheLocation

    public void addCacheLocation(int index,
                                 String newPath)

  Specified by:
    `addCacheLocation` in interface `FileCache`

### addCacheLocation

    public void addCacheLocation(String newPath)

  Specified by:
    `addCacheLocation` in interface `FileCache`

### contains

    public boolean contains(String fileName)

  Specified by:
    `contains` in interface `FileCache`

### findFile

    public URL findFile(String fileName,
                        boolean checkClassPath)

  Specified by:
    `findFile` in interface `FileCache`
  Parameters:
    `fileName` - the name of the file to find
    `checkClassPath` - if `true`, the class path is first searched for the file, otherwise the class path is not searched unless it's one of the explicit paths in the cache search directories
  Returns:
    a handle to the requested file if it exists in the cache, otherwise null
  Throws:
    `IllegalArgumentException` - if `fileName` is null

### getCacheLocations

    public List<File> getCacheLocations()

  Specified by:
    `getCacheLocations` in interface `FileCache`

### getWriteLocation

    public File getWriteLocation()

  Specified by:
    `getWriteLocation` in interface `FileCache`

### initialize

    protected void initialize(InputStream xmlConfigStream)

### newFile

    public File newFile(String fileName)

  Specified by:
    `newFile` in interface `FileCache`
  Parameters:
    `fileName` - the name to give the newly created file
  Returns:
    a handle to the newly created file if it could be created and added to the cache, otherwise null
  Throws:
    `IllegalArgumentException` - if `fileName` is null

### removeCacheLocation

    public void removeCacheLocation(String newPath)

  Specified by:
    `removeCacheLocation` in interface `FileCache`

### removeFile

    public void removeFile(URL url)

  Specified by:
    `removeFile` in interface `FileCache`
  Parameters:
    `url` - the "file:" URL of the file to remove from the cache
  Throws:
    `IllegalArgumentException` - if `url` is null

Overview | Package | Class | Use | Tree | Index | Help
| NASA World Wind
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD