j2sNative references moved to Platform
[jalview.git] / src / jalview / ws / utils / UrlDownloadClient.java
index cfe080c..77fbd5b 100644 (file)
@@ -21,6 +21,8 @@
 
 package jalview.ws.utils;
 
+import jalview.util.Platform;
+
 import java.io.ByteArrayInputStream;
 import java.io.File;
 import java.io.FileOutputStream;
@@ -114,13 +116,8 @@ public class UrlDownloadClient
 
   public static void download(String urlstring, File tempFile) throws IOException
   {
-    if (/** @j2sNative 1?false: */true) {
-      download(urlstring, tempFile.toString());
+    if (!Platform.setFileBytes(tempFile, urlstring)) {
+        download(urlstring, tempFile.toString());      
     }
-    // JavaScript only
-
-    /** @j2sNative 
-     * tempFile._bytes = swingjs.JSUtil.getFileAsBytes(urlstring); 
-     */
   }
 }