//long time = System.currentTimeMillis();
try {
udl = new URLDownload(frame, url, tmp);
// TODO: what if this takes long time?
// TODO: stop editor dialog if this results in an error:
udl.openConnectionOnly(); // Read MIME type
} catch (IOException ex) {
JOptionPane.showMessageDialog(frame, Globals.lang("Invalid URL")+": "
+ ex.getMessage(), Globals.lang("Download file"),
JOptionPane.ERROR_MESSAGE);
Globals.logger("Error while downloading " + "'" + res + "'");