Worldwind public release 0.2
[worldwind-tracker.git] / gov / nasa / worldwind / BasicDataFileCache.java
blob2f884c2910eea9a2d0941d460ca5768055bc3dac
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;
9 /**
10 * @author Tom Gaskins
11 * @version $Id: BasicDataFileCache.java 1792 2007-05-08 21:28:37Z tgaskins $
13 public class BasicDataFileCache extends AbstractFileCache
15 public BasicDataFileCache()
17 String cachePathName = Configuration.getStringValue(AVKey.DATA_FILE_CACHE_CONFIGURATION_FILE_NAME);
18 if (cachePathName == null)
20 String message = WorldWind.retrieveErrMsg("FileCache.NoConfiguration");
21 WorldWind.logger().log(java.util.logging.Level.FINE, message);
22 throw new IllegalStateException(message);
25 java.io.InputStream is = this.getClass().getClassLoader().getResourceAsStream(cachePathName);
26 if (is == null)
28 String message = WorldWind.retrieveErrMsg("FileCache.ConfigurationNotFound");
29 WorldWind.logger().log(java.util.logging.Level.FINE, message);
30 throw new IllegalStateException(message);
33 this.initialize(is);