Changed package name from altosui to AltosUI
[fw/altos] / altosui / AltosSiteMapCache.java
index cfad52a9d5e3cbe7ba631c77725192afb126ed9a..6e7e423b3c2a1a0cbebcb1394e5e72f65f68a189 100644 (file)
@@ -15,7 +15,7 @@
  * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
  */
 
-package altosui;
+package AltosUI;
 
 import java.awt.*;
 import java.awt.image.*;
@@ -29,6 +29,7 @@ import java.text.*;
 import java.util.prefs.*;
 import java.net.URL;
 import java.net.URLConnection;
+import org.altusmetrum.AltosLib.*;
 
 public class AltosSiteMapCache extends JLabel {
        public static boolean fetchMap(File file, String url) {
@@ -37,7 +38,6 @@ public class AltosSiteMapCache extends JLabel {
                try {
                        u = new URL(url);
                } catch (java.net.MalformedURLException e) {
-                       System.out.printf("Malformed URL '%s'\n", url);
                        return false;
                }
 
@@ -58,12 +58,9 @@ public class AltosSiteMapCache extends JLabel {
                        in.close();
 
                        if (offset != contentLength) {
-                               System.out.printf("Bad length %d != %d\n",
-                                                 offset, contentLength);
                                return false;
                        }
                } catch (IOException e) {
-                       System.out.printf("IO exception reading URL\n");
                        return false;
                }
 
@@ -73,13 +70,11 @@ public class AltosSiteMapCache extends JLabel {
                        out.flush();
                        out.close();
                } catch (FileNotFoundException e) {
-                       System.out.printf("Can't create file\n");
                        return false;
                } catch (IOException e) {
                        if (file.exists()) {
                                file.delete();
                        }
-                       System.out.printf("IO exception writing file\n");
                        return false;
                }
                return true;