Commit in GeomConverter/src/org/lcsim/util/cache on MAIN
FileCache.java+3-11.2 -> 1.3
Make more robust against server hangs

GeomConverter/src/org/lcsim/util/cache
FileCache.java 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- FileCache.java	6 Jul 2005 04:51:19 -0000	1.2
+++ FileCache.java	25 Sep 2007 19:53:29 -0000	1.3
@@ -81,19 +81,21 @@
          {
             URLConnection connection = url.openConnection();
             connection.setConnectTimeout(5000);
+            connection.setReadTimeout(5000);
             long updated = connection.getLastModified();
             long cached = cacheFile.lastModified();
             if (updated > cached) downloadRequired = true;
          }
          catch (IOException x)
          {
-            // Just assume file in cache is OK.
+            //if (print != null) print.println("Warning: file cache could not access "+url+", "+x.getMessage());
          }
       }
       if (downloadRequired)
       {
          URLConnection connection = url.openConnection();
          connection.setConnectTimeout(10000);
+         connection.setReadTimeout(10000);
          long size  = connection.getContentLength();
          InputStream in = connection.getInputStream();
          if (in != null)
CVSspam 0.2.8