public boolean wget(String url,String fileName,int timeout){
  boolean result=false;
  StringBuilder buf=new StringBuilder();
  String command=String.format(ImageServerDialogProperties.getString("cmd.wget"),url,"'" + fileName + "'");
  sendWaitFor(command,timeout,prompts,buf);
  log.debug(buf.toString());
  String[] lines=getLines(buf);
  String regex=".*" + fileName + ".* saved .*";
  for (  String line : lines) {
    if (Pattern.matches(regex,line)) {
      result=true;
    }
  }
  return result;
}

public boolean wget ( String url , String fileName , int timeout ) { boolean result = false ; StringBuilder buf = new StringBuilder ( ) ; String command = String . format ( ImageServerDialogProperties . getString ( "cmd.wget" ) , url , "'" + fileName + "'" ) ; sendWaitFor ( command , timeout , prompts , buf ) ; log . debug ( buf . toString ( ) ) ; String [ ] lines = getLines ( buf ) ; String regex = ".*" + fileName + ".* saved .*" ; for ( String line : lines ) { if ( Pattern . matches ( regex , line ) ) { result = true ; } } return result ; }
executes ' wget ' command . return true if successful .
