code: public void connect() throws IOException {
          if (this.connected) {
              return;
          }
          
          this.downloadFile = File.createTempFile(CLASSNAME, null, TMPDIR);
          try {
              String [] cmd = getCommand(this.url, this.downloadFile);    
              if (LOGGER.isLoggable(Level.FINE)) {
                  StringBuffer buffer = new StringBuffer();
                  for (int i = 0; i < cmd.length; i++) {
                      if (i > 0) {
                          buffer.append(" ");
                      }
                      buffer.append(cmd[i]);
                  }
                  LOGGER.fine("Command: " + buffer.toString());
              }
              ProcessResult pr = ProcessUtils.exec(cmd);
              if (pr.getResult() != 0) {
                  LOGGER.info(Arrays.toString(cmd) + " returned non-null " + pr.getResult());
              }
              // Assume download went smoothly.
              this.connected = true;
          } catch (IOException ioe) {
              // Clean up my tmp file.
              this.downloadFile.delete();
              this.downloadFile = null;
              // Rethrow.
              throw ioe;
          }
      }
docs: Do script copy to local file.
  File is available via {@link #getFile()}.
  @throws IOException