2003/02/27 08:26:13
[org.ibex.core.git] / src / org / xwt / Resources.java
index d525ad0..1996501 100644 (file)
@@ -4,7 +4,7 @@ package org.xwt;
 import java.io.*;
 import java.net.*;
 import java.util.*;
-import jazz.*;
+import java.util.zip.*;
 import java.lang.*;
 import java.applet.*;
 import org.mozilla.javascript.*;
@@ -84,7 +84,6 @@ public class Resources {
                 }
                 public int read(byte[] b, int off, int len) throws IOException {
                     int ret = super.read(b, off, len);
-                    if (ret != -1) bytesDownloaded += ret;
                     if (clear && callback != null) {
                         clear = false;
                         ThreadMessage.newthread(new JSObject.JSFunction() {
@@ -98,6 +97,7 @@ public class Resources {
                                 }                            
                             });
                     }
+                    bytesDownloaded += ret;
                     return ret;
                 }
             });