question: 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 ; }
target:  Executes 'wget' command. Return true if successful.