git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
consolidation of Platform isJS calls
[jalview.git]
/
src
/
jalview
/
ws
/
utils
/
UrlDownloadClient.java
diff --git
a/src/jalview/ws/utils/UrlDownloadClient.java
b/src/jalview/ws/utils/UrlDownloadClient.java
index
055df15
..
58632f2
100644
(file)
--- a/
src/jalview/ws/utils/UrlDownloadClient.java
+++ b/
src/jalview/ws/utils/UrlDownloadClient.java
@@
-23,7
+23,6
@@
package jalview.ws.utils;
import jalview.util.Platform;
import jalview.util.Platform;
-import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
@@
-116,13
+115,8
@@
public class UrlDownloadClient
public static void download(String urlstring, File tempFile) throws IOException
{
public static void download(String urlstring, File tempFile) throws IOException
{
- // 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 {
+ if (!Platform.setFileBytes(tempFile, urlstring))
+ {
download(urlstring, tempFile.toString());
}
}
download(urlstring, tempFile.toString());
}
}