package jalview.ws.utils;
-import jalview.util.Platform;
-
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
+import jalview.util.HttpUtils;
+import jalview.util.Platform;
+
public class UrlDownloadClient
{
/**
temp = Files.createTempFile(".jalview_", ".tmp");
URL url = new URL(urlstring);
- rbc = Channels.newChannel(url.openStream());
+ rbc = Channels.newChannel(HttpUtils.openStream(url));
fos = new FileOutputStream(temp.toString());
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);