public void download(String remoteFileName,File localFile,long restartAt,FTPDataTransferListener listener) throws IllegalStateException, FileNotFoundException, IOException, FTPIllegalReplyException, FTPException, FTPDataTransferException, FTPAbortedException {
  OutputStream outputStream=null;
  try {
    outputStream=new FileOutputStream(localFile,restartAt > 0);
  }
 catch (  IOException e) {
    throw new FTPDataTransferException(e);
  }
  try {
    download(remoteFileName,outputStream,restartAt,listener);
  }
 catch (  IllegalStateException e) {
    throw e;
  }
catch (  IOException e) {
    throw e;
  }
catch (  FTPIllegalReplyException e) {
    throw e;
  }
catch (  FTPException e) {
    throw e;
  }
catch (  FTPDataTransferException e) {
    throw e;
  }
catch (  FTPAbortedException e) {
    throw e;
  }
 finally {
    if (outputStream != null) {
      try {
        outputStream.close();
      }
 catch (      Throwable t) {
        ;
      }
    }
  }
}

public void download ( String remoteFileName , File localFile , long restartAt , FTPDataTransferListener listener ) throws IllegalStateException , FileNotFoundException , IOException , FTPIllegalReplyException , FTPException , FTPDataTransferException , FTPAbortedException { OutputStream outputStream = null ; try { outputStream = new FileOutputStream ( localFile , restartAt > 0 ) ; } catch ( IOException e ) { throw new FTPDataTransferException ( e ) ; } try { download ( remoteFileName , outputStream , restartAt , listener ) ; } catch ( IllegalStateException e ) { throw e ; } catch ( IOException e ) { throw e ; } catch ( FTPIllegalReplyException e ) { throw e ; } catch ( FTPException e ) { throw e ; } catch ( FTPDataTransferException e ) { throw e ; } catch ( FTPAbortedException e ) { throw e ; } finally { if ( outputStream != null ) { try { outputStream . close ( ) ; } catch ( Throwable t ) { ; } } } }
this method resumes a download operation from the remote server to a local file . calling this method blocks the current thread until the operation is completed . the operation could be interrupted by another thread calling abortcurrentdatatransfer ( ) . the method will break with a ftpabortedexception .
