package jalview.ws.utils;
+import jalview.util.Platform;
+
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileOutputStream;
public static void download(String urlstring, File tempFile) throws IOException
{
- if (/** @j2sNative 1?false: */true) {
+ // BH 2019.01.25 this said "...getFileAsBytes(..." which cannot work.
+ // maybe we cannot get here?
+ if (Platform.isJS()) {
+ /** @j2sNative
+ * tempFile._bytes = swingjs.JSUtil.getFileAsBytes$O(urlstring);
+ */
+ } else {
download(urlstring, tempFile.toString());
}
- // JavaScript only
-
- /** @j2sNative
- * tempFile._bytes = swingjs.JSUtil.getFileAsBytes(urlstring);
- */
}
}