Updated to worldwind release 20070817
[worldwind-tracker.git] / gov / nasa / worldwind / cache / BasicDataFileCache.java
bloba22be62e6f0298ddcd18283dccc5b18c585a2599
1 /*
2 Copyright (C) 2001, 2006 United States Government
3 as represented by the Administrator of the
4 National Aeronautics and Space Administration.
5 All Rights Reserved.
6 */
7 package gov.nasa.worldwind.cache;
9 import gov.nasa.worldwind.Configuration;
10 import gov.nasa.worldwind.avlist.AVKey;
11 import gov.nasa.worldwind.util.Logging;
13 /**
14 * @author Tom Gaskins
15 * @version $Id: BasicDataFileCache.java 2471 2007-07-31 21:50:57Z tgaskins $
17 public class BasicDataFileCache extends AbstractFileCache
19 public BasicDataFileCache()
21 String cachePathName = Configuration.getStringValue(AVKey.DATA_FILE_CACHE_CONFIGURATION_FILE_NAME);
22 if (cachePathName == null)
24 String message = Logging.getMessage("FileCache.NoConfiguration");
25 Logging.logger().severe(message);
26 throw new IllegalStateException(message);
29 java.io.InputStream is = this.getClass().getClassLoader().getResourceAsStream(cachePathName);
30 if (is == null)
32 String message = Logging.getMessage("FileCache.ConfigurationNotFound", cachePathName);
33 Logging.logger().severe(message);
34 throw new IllegalStateException(message);
37 this.initialize(is);